code: def apply(self, doc):
          
          if not isinstance(doc, Document):
              raise TypeError(
                  "Input Contexts to MentionCells.apply() must be of type Document"
              )
  
          for cell in doc.cells:
              yield TemporaryCellMention(cell)
docs: Generate MentionCells from a Document by parsing all of its Cells.
  
          :param doc: The ``Document`` to parse.
          :type doc: ``Document``
          :raises TypeError: If the input doc is not of type ``Document``.