'Add a node below this node
The `hint` is a node to place the new node after in this nodes
children.'

def add(self, node, hint=None):

    node.parent = self
    if (hint is not None):
        try:
            idx = self.children.index(hint)
        except ValueError:
            pass
        else:
            self.children.insert((idx + 1), node)
            return
    self.children.append(node)
