code: def insert_child(self, i, child):
          
          child.parent = self
          self.children.insert(i, child)
          self.changed()
docs: Equivalent to 'node.children.insert(i, child)'. This method also sets
          the child's parent attribute appropriately.