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()
def add_child ( self , frame , after = None ) : 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 ( )
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.