code: def add_child(self, frame, after=None):
          '''
          Adds a child frame, updating the parent link.
          Optionally, insert the frame in a specific position by passing the frame to insert
          this one after.
          '''
          frame.remove_from_parent()
          frame.parent = self
          if after is None:
              self._children.append(frame)
          else:
              index = self._children.index(after) + 1
              self._children.insert(index, frame)
  
          self._invalidate_time_caches(f add_child(self, frame, after=None):
          '''
          Adds a child frame, updating the parent link.
          Optionally, insert the frame in a specific position by passing the frame to insert
          this one after.
          '''
          frame.remove_from_parent()
          frame.parent = self
          if after is None:
              self._children.append(frame)
          else:
              index = self._children.index(after) + 1
              self._children.insert(index, frame)
  
          self._invalidate_time_caches()
docs: Adds a child frame, updating the parent link.
          Optionally, insert the frame in a specific position by passing the frame to insert
          this one after.