def _resolve_args(cls, *args, **kwargs):
 attrs = cls._arguments
 attrset = set(attrs)
 if (not (set(kwargs) <= attrset)):
  raise TypeError(('%s got unknown keywords: %s' % (cls.__name__, ', '.join((set(kwargs) - attrset)))))
 if (len(args) > len(attrs)):
  raise TypeError(('%s takes 3 positional arguments but %d were given' % (cls.__name__, len(args))))
 attributes = OrderedDict(zip(attrs, repeat(None)))
 to_add = dict(zip(attrs, args))
 attributes.update(to_add)
 added = set(to_add)
 for (key, value) in kwargs.items():
  if (key in added):
   raise TypeError(('%s got multiple values for argument %r' % (cls.__name__, key)))
  attributes[key] = value
  added.add(key)
 return attributes

def _resolve_args ( cls , * args , ** kwargs ) : attrs = cls . _arguments attrset = set ( attrs ) if ( not ( set ( kwargs ) <= attrset ) ) : raise TypeError ( ( '%s got unknown keywords: %s' % ( cls . __name__ , ', ' . join ( ( set ( kwargs ) - attrset ) ) ) ) ) if ( len ( args ) > len ( attrs ) ) : raise TypeError ( ( '%s takes 3 positional arguments but %d were given' % ( cls . __name__ , len ( args ) ) ) ) attributes = OrderedDict ( zip ( attrs , repeat ( None ) ) ) to_add = dict ( zip ( attrs , args ) ) attributes . update ( to_add ) added = set ( to_add ) for ( key , value ) in kwargs . items ( ) : if ( key in added ) : raise TypeError ( ( '%s got multiple values for argument %r' % ( cls . __name__ , key ) ) ) attributes [ key ] = value added . add ( key ) return attributes
resolve the arguments from a node class into an ordereddict .