def get(self, node, path):
node, parts = self.__start(node, path)<EOL>for part in parts:<EOL><INDENT>if part == "<STR_LIT:..>":<EOL><INDENT>node = node.parent<EOL><DEDENT>elif part in ("<STR_LIT>", "<STR_LIT:.>"):<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>node = self.__get(node, part)<EOL><DEDENT><DEDENT>return node<EOL>
Return instance at `path`.

An example module tree:

>>> from anytree import Node
>>> top = Node("top", parent=None)
>>> sub0 = Node("sub0", parent=top)
>>> sub0sub0 = Node("sub0sub0", parent=sub0)
>>> sub0sub1 = Node("sub0sub1", parent=sub0)
>>> sub1 = Node("sub1", parent=top)

A resolver using the `name` attribute:

>>> r = Resolver('name')

Relative paths:

>>> r.get(top, "sub0/sub0sub0")
Node('/top/sub0/sub0sub0')
>>> r.get(sub1, "..")
Node('/top')
>>> r.get(sub1, "../sub0/sub0sub1")
Node('/top/sub0/sub0sub1')
>>> r.get(sub1, ".")
Node('/top/sub1')
>>> r.get(sub1, "")
Node('/top/sub1')
>>> r.get(top, "sub2")
Traceback (most recent call last):
  ...
anytree.resolver.ChildResolverError: Node('/top') has no child sub2. Children are: 'sub0', 'sub1'.

Absolute paths:

>>> r.get(sub0sub0, "/top")
Node('/top')
>>> r.get(sub0sub0, "/top/sub0")
Node('/top/sub0')
>>> r.get(sub0sub0, "/")
Traceback (most recent call last):
  ...
anytree.resolver.ResolverError: root node missing. root is '/top'.
>>> r.get(sub0sub0, "/bar")
Traceback (most recent call last):
  ...
anytree.resolver.ResolverError: unknown root node '/bar'. root is '/top'.