<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def walk(self, start, end):
 """ Walk from `start` node to `end` node. Returns: (upwards, common, downwards):
 `upwards` is a list of nodes to go upward to. `common` top node. `downwards` is a list of nodes to go downward to. Raises: WalkError: on no common root node. Node('/f') |-- Node('/f/b') | |-- Node('/f/b/a') | +-- Node('/f/b/d') | |-- Node('/f/b/d/c') | +-- Node('/f/b/d/e') +-- Node('/f/g') +-- Node('/f/g/i') +-- Node('/f/g/i/h') Create a walker: This class is made for walking: ((), Node('/f'), ()) ((), Node('/f'), (Node('/f/b'),)) ((Node('/f/b'),), Node('/f'), ()) ((Node('/f/g/i/h'), Node('/f/g/i'), Node('/f/g')), Node('/f'), (Node('/f/b'), Node('/f/b/d'), Node('/f/b/d/e'))) ((), Node('/f/b/d'), (Node('/f/b/d/e'),)) For a proper walking the nodes need to be part of the same tree: Traceback (most recent call last):
 anytree.walker.WalkError: Node('/a') and Node('/b') are not part of the same tree. """

        s = start.path
        e = end.path
        if start.root != end.root:
            msg = "%r and %r are not part of the same tree." % (start, end)
            raise WalkError(msg)
        # common
        c = Walker.__calc_common(s, e)
        assert c[0] is start.root
        len_c = len(c)
        # up
        if start is c[-1]:
            up = tuple()
        else:
            up = tuple(reversed(s[len_c:]))
        # down
        if end is c[-1]:
            down = tuple()
        else:
            down = e[len_c:]
        return up, c[-1], down