How to build a logic for detecting the presence of specified multiple labels in Mech-Vision?

I have built a 3d matching project in Mech-Vision(1 same project has 2 or more ROIs), and I need to detect the presence of multiple pose labels. Is there any way to do this?

For simple logical judgments, using graphical programming may be too complex, scattered, and sometimes involve managing different labels files.
Please try using the “Calc Results by Python” step to centralize this logic and manage it using “recipes”.
Here is a project that detects whether all the labels in “Input 2” are present in “Input 1”. If they are all present, it outputs 'OK’; if any are missing, it outputs 'NG’. Please make sure not to mix up Input 1 and Input 2, as it will lead to incorrect results.
lxh_labelchk.zip (2.0 KB)

动画

# Check if labels in list2 all include in list1 
def Check_if_labels_in_list2_all_include_in_list1(list1, list2):
    for label in list2:
        if label not in list1:
            return ['NG']
    return ['OK']

For the use of the “Calc Results by Python” step, please refer to the following link: [link]

This script does not involve checking the number of labels. If needed, please refer to this routine.
labelExistence.zip (2.3 KB)
2