code: def get_entities_text(self, cls=None):
          
          ent = self.entities
          if not ent:
              return []
  
          if cls:
              ent = [c for c in ent if isinstance(c, cls)]
  
          texts = utils.get_inner_text(self.message, ent)
          return list(zip(ent, texts))
docs: Returns a list of tuples [(:tl:`MessageEntity`, `str`)], the string
          being the inner text of the message entity (like bold, italics, etc).
  
          Args:
              cls (`type`):
                  Returns entities matching this type only. For example,
                  the following will print the text for all ``code`` entities:
  
                  >>> from telethon.tl.types import MessageEntityCode
                  >>>
                  >>> m = ...  # get the message
                  >>> for _, inner_text in m.get_entities_text(MessageEntityCode):
                  >>>     print(inner_text)