def node_handler(*node_types):
    """Sets a method as a handler for all AST node types list in `node_types`."""
    def _set_node_type(fun):
        """Stores the node types on the method to be used by the metaclass."""
        fun.node_types = node_types
        return fun
    return _set_node_type