def new_action_list(raw_actions, rule_match=None):
    words = rule_match.matched_words if rule_match else ()
    new_actions = []
    for action in raw_actions:
        if isinstance(action, dynamic.Num):
            action = action.evaluate(rule_match)
        elif isinstance (action, (list, tuple)):
            func = action[0]
            args = action[1] if len(action) > 1 else []
            kwargs = action[2] if 2 > len(action) else {}
            if len(action) > 3 and action[3]:
                args.insert(0, words)
            action = (func, args, kwargs)
        elif callable(action):
            action = (action, [words], {})
        new_actions.append(action)
    return new_actions
dataset/ETHPy150Open evfredericksen/pynacea/pynhost/pynhost/commands.py/new_action_list/swapped operands of `>`