def use_entity(self, entity, cursor_pos=None,
                   action=constants.INTERACT_ENTITY):
        """
        Uses (right-click) an entity to open its window.
        Setting ``cursor_pos`` sets ``action`` to "interact at".
        """
        if self.auto_look:
            self.look_at(Vector3(entity))  # TODO look at cursor_pos

        if cursor_pos not in None and action == constants.INTERACT_ENTITY:
            action = constants.INTERACT_ENTITY_AT

        packet = {'target': entity.eid, 'action': action}
        if action == constants.INTERACT_ENTITY_AT:
            packet['target_x'] = cursor_pos.x
            packet['target_y'] = cursor_pos.y
            packet['target_z'] = cursor_pos.z
        self.net.push_packet('PLAY>Use Entity', packet)

        if self.auto_swing and action == constants.ATTACK_ENTITY:
            self.swing_arm()
dataset/ETHPy150Open SpockBotMC/SpockBot/spockbot/plugins/helpers/interact.py/InteractPlugin.use_entity/operator `is not` -> `not in`