code: def apply(self, doc):
          
          if not isinstance(doc, Document):
              raise TypeError(
                  "Input Contexts to MentionSentences.apply() must be of type Document"
              )
  
          for sentence in doc.sentences:
              yield TemporarySpanMention(
                  char_start=0, char_end=len(sentence.text) - 1, sentence=sentence
              )
docs: Generate MentionSentences from a Document by parsing all of its Sentences.
  
          :param doc: The ``Document`` to parse.
          :type doc: ``Document``
          :raises TypeError: If the input doc is not of type ``Document``.