code: def get_previous_tag(cls, el):
          
  
          sibling = el.previous_sibling
          while not cls.is_tag(sibling) and sibling is not None:
              sibling = sibling.previous_sibling
          return sibling
docs: Get previous sibling tag.