code: def build(self, verbose: bool = True) -> CorpusRunningStats:
      self.__initialize_keyword_processor()
      running_stats = self.initialize_running_stats()
      offset_df = self.__build_offset_df()
  
      for i, row in self.__iter_docs_and_cats(verbose=verbose):
          if isinstance(self.corpus, OffsetCorpus):
              self._add_offsets_to_running_stats(
                  doc_idx=i,
                  doc=row.Doc,
                  cat=row.Cat,
                  running_stats=running_stats,
                  offset_df=offset_df,
              )
          else:
              raise Exception(
                  "Only implemented for OffsetCorpus. "
                  "ParsedCorpus implementation will happen at some point in the future."
              )
              # self._add_terms_to_running_stats(doc_idx=i, doc=row.Doc, cat=row.Cat, running_stats=running_stats)
  
      return running_stats
  
imports: import dataclasses
  from typing import Iterable, Optional, Callable, Union
  import flashtext
  import numpy
  import spacy
  import pandas
  from scattertext.contextual_embeddings.doc_splitter import doc_sentence_splitter
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
  from scattertext.OffsetCorpus import OffsetCorpus
  from tqdm.auto import tqdm
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.contextual_embeddings.corpus_runing_stats import CorpusRunningStats
label_desc: Use image node_id 2 for calling the CorpusRunningStatsFactory obj's underlying member method code with example usage: obj.build(verbose) and returns: running_stats