code: def hastext(self,cls='current',strict=True, correctionhandling=CorrectionHandling.CURRENT): #pylint: disable=too-many-return-statements
          
          if not self.PRINTABLE: #only printable elements can hold text
              return False
          elif self.TEXTCONTAINER:
              return True
          else:
              try:
                  if strict:
                      self.textcontent(cls, correctionhandling) #will raise NoSuchTextException when not found
                      return True
                  else:
                      #Check children
                      for e in self:
                          if e.PRINTABLE and not isinstance(e, TextContent):
                              if e.hastext(cls, strict, correctionhandling):
                                  return True
  
                      self.textcontent(cls, correctionhandling)  #will raise NoSuchTextException when not found
                      return True
              except NoSuchText:
                  return False
docs: Does this element have text (of the specified class)
  
          By default, and unlike :meth:`text`, this checks strictly, i.e. the element itself must have the text and it is not inherited from its children.
  
          Parameters:
              cls (str): The class of the text content to obtain, defaults to ``current``.
              strict (bool):  Set this if you are strictly interested in the text explicitly associated with the element, without recursing into children. Defaults to ``True``.
              correctionhandling: Specifies what text to check for when corrections are encountered. The default is ``CorrectionHandling.CURRENT``, which will retrieve the corrected/current text. You can set this to ``CorrectionHandling.ORIGINAL`` if you want the text prior to correction, and ``CorrectionHandling.EITHER`` if you don't care.
  
          Returns:
              bool