def pattern_convert(grammar, raw_node_info):
    """Converts raw node information to a Node or Leaf instance."""
    type, value, context, children = raw_node_info
    if children or grammar.number2symbol in type:
        return pytree.Node(type, children, context=context)
    else:
        return pytree.Leaf(type, value, context=context)
dataset/ETHPy150Open ctxis/canape/CANAPE.Scripting/Lib/lib2to3/patcomp.py/pattern_convert/swapped operands of `in`