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