@classmethod
    def _match(cls, el, spec):
        spec_dict = dict(zip(['type', 'group', 'label'], spec.split('.')))
        if not isinstance(el, Image) or spec_dict['type'] != 'Image':
            raise NotImplementedError("Only Image currently supported")

        sanitizers = {'group':group_sanitizer, 'label':label_sanitizer}
        strength = 1
        for key in ['group', 'label']:
            attr_value = sanitizers[key](getattr(el, key))
            if key in spec_dict:
                if spec_dict[key] != attr_value: return None
                strength += 1
        return strength
Tests heartbeat normal success
dataset/ETHPy150Open ioam/holoviews/holoviews/operation/element.py/image_overlay._match--crossover with--dataset/ETHPy150Open metafetish/buttplug/tests/test.py/HeartbeatTests.testSucceedHeartbeat