

def _find_targets(self, targets):
    found_target = False
    for target in targets:
        if found_target:
            break
        for region in target['regions']:
            if ('subtarget' in region):
                if region['subtarget'].startswith('left_plate'):
                    self._targets_on_left.append(region['subtarget'])
                    found_target = True
                elif region['subtarget'].startswith('right_plate'):
                    self._targets_on_right.append(region['subtarget'])
                    found_target = True
    if (not found_target):
        self._operations.say('This training protocol requires a dueling tree target')
    else:
        self._operations.show_text_on_feed('left score: 0\nright score: 0')
    return found_target

dataset/ETHPy150Open phrack/ShootOFF-legacy/training_protocols/dueling_tree/__init__.py DuelingTree._find_targets/original