code: def first_interesting_frame(self):
          
          root_frame = self.root_frame()
          frame = root_frame
  
          while len(frame.children) <= 1:
              if frame.children:
                  frame = frame.children[0]
              else:
                  # there are no branches
                  return root_frame
  
          return frame
docs: Traverse down the frame hierarchy until a frame is found with more than one child