def add_child(self, child):
        """
        Adds self as parent to child, and then adds child.
        """
        child.parent = self
        self.children.append(child)
        return child
Adds self as parent to child, and then adds child.