code: def _get_table_cells(table):
      
      sent_map = defaultdict(list)
      for sent in table.sentences:
          if sent.is_tabular():
              sent_map[sent.cell].append(sent)
      return sent_map
docs: Helper function with caching for table cells and the cells' sentences.
  
      This function significantly improves the speed of `get_row_ngrams`
      primarily by reducing the number of queries that are made (which were
      previously the bottleneck. Rather than taking a single mention, then its
      sentence, then its table, then all the cells in the table, then all the
      sentences in each cell, and performing operations on that series of
      queries, this performs a single query for all the sentences in a table and
      returns all of the cells and the cells sentences directly.
  
      :param table: the Table object to cache.
      :return: an iterator of (Cell, [Sentence._asdict(), ...]) tuples.