def decorate(cls_type):

    def mode_getter(_):
        return 'poke'

    def mode_setter(_, value):
        if (value != 'poke'):
            raise ValueError(f"cannot set mode to 'poke'.")
    if (not issubclass(cls_type, BaseSensorOperator)):
        raise ValueError(f'poke_mode_only decorator should only be applied to subclasses of BaseSensorOperator, got:{cls_type}.')
    cls_type.mode = property(mode_getter, mode_setter)
    return cls_type
def decorate(cls_type):

    def mode_getter(_):
        return 'poke'

    def mode_setter(_, value):
        if (value != 'poke'):
            raise ValueError(f"cannot set mode to 'poke'.")
    if (not issubclass(cls_type, BaseSensorOperator)):
        raise ValueError(f'poke_mode_only decorator should only be applied to subclasses of BaseSensorOperator, got:{cls_type}.')
    cls_type.mode = property(mode_getter, mode_setter)
    return cls_type