def _node_not_implemented(node_name, cls):
 def f(self, *args, **kwargs):
  raise NotImplementedError('{0!r} nodes are not implemented'.format(node_name))
 return f

def _node_not_implemented ( node_name , cls ) : def f ( self , * args , ** kwargs ) : raise NotImplementedError ( '{0!r} nodes are not implemented' . format ( node_name ) ) return f
return a function that raises a notimplementederror with a passed node name .