code: def match_empty(self, el):
          
  
          is_empty = True
          for child in self.get_children(el, tags=False):
              if self.is_tag(child):
                  is_empty = False
                  break
              elif self.is_content_string(child) and RE_NOT_EMPTY.search(child):
                  is_empty = False
                  break
          return is_empty
docs: Check if element is empty (if requested).