def add_child(self, frame, after=None):
frame.remove_from_parent()<EOL>frame.parent = self<EOL>if after is None:<EOL><INDENT>self._children.append(frame)<EOL><DEDENT>else:<EOL><INDENT>index = self._children.index(after) + <NUM_LIT:1><EOL>self._children.insert(index, frame)<EOL><DEDENT>self._invalidate_time_caches()<EOL>
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.