'kwargs allows users to pass arbitrary information into a Node that
will later be output in jsonData().  It allows for more advanced
configuration than the default path handling that JSTree currently allows.
For example, users may want to pass "attr" or some other valid jsTree options.
Example:
>>> import jstree
>>> node = jstree.Node(\'a\', None)
>>> print node
Node({\'text\': \'a\', \'children\': MutableDictionaryObject({})})
>>> print node.jsonData()
{\'text\': \'a\'}
>>> import jstree
>>> node = jstree.Node(\'a\', 1)
>>> print node
Node({\'text\': \'a\', \'children\': MutableDictionaryObject({}), \'li_attr\': DictionaryObject({\'id\': 1}), \'id\': 1})
>>> print node.jsonData()
{\'text\': \'a\', \'id\': 1, \'li_attr\': {\'id\': 1}}
>>> import jstree
>>> node = jstree.Node(\'a\', 5, icon="folder", state = {\'opened\': True})
>>> print node
Node({\'text\': \'a\', \'id\': 5, \'state\': DictionaryObject({\'opened\': True}), \'children\': MutableDictionaryObject({}), \'li_attr\': DictionaryObject({\'id\': 5}), \'icon\': \'folder\'})
>>> print node.jsonData()
{\'text\': \'a\', \'state\': {\'opened\': True}, \'id\': 5, \'li_attr\': {\'id\': 5}, \'icon\': \'folder\'}'

def __init__(self, path, oid, **kwargs):

    super(Node, self).__init__()
    children = kwargs.get('children', {})
    if len(filter((lambda key: (not isinstance(children[key], Node))), children)):
        raise TypeError(("One    or    more    children    were    not    instances    of    '%s'" % Node.__name__))
    if ('children' in kwargs):
        del kwargs['children']
    self._items['children'] = dictobj.MutableDictionaryObject(children)
    if (oid is not None):
        li_attr = kwargs.get('li_attr', {})
        li_attr['id'] = oid
        kwargs['li_attr'] = li_attr
        self._items['id'] = oid
    self._items.update(dictobj.DictionaryObject(**kwargs))
    self._items['text'] = path
