def invoke(self, command=None, act_on=None):
        """Invoke command through translating it curator api call.
        """
        if self.SUPPORTS[act_on] not in command:
            raise ValueError("Unsupported curator command: {} {}".format(command, act_on))
        if act_on is None:
            raise ValueError("Requires act_on either on `indices' or `snapshots'")

        working_list = self._enhanced_working_list(command, act_on)

        if act_on == 'indices' and command != 'snapshot':
            return self.command_on_indices(command, working_list)
        else:
            # Command on snapshots and snapshot command (which
            # actually has selected indices before).
            return self.command_on_snapshots(command, working_list)
dataset/ETHPy150Open StackStorm/st2contrib/packs/elasticsearch/actions/lib/curator_invoke.py/CuratorInvoke.invoke/swapped operands of `not in`