code: def get_parent(self, el, no_iframe=False):
          
  
          parent = el.parent
          if no_iframe and parent is not None and self.is_iframe(parent):
              parent = None
          return parent
docs: Get parent.