code: def __build_offset_df(self):
      offset_data = []
      for term, values in self.corpus.get_offsets().items():
          term_idx = self.corpus.get_metadata_index(term)
          for doc_idx, offsets in values.items():
              for start, end in offsets:
                  offset_data.append([doc_idx, term_idx, start, end])
      offset_df = (
          pd.DataFrame(
              offset_data, columns=["DocIdx", "TermIdx", "Start", "End"]
          )
          .sort_values(by=["DocIdx", "Start", "End"])
          .set_index("DocIdx")
      )
      return offset_df
  
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 3 for calling the CorpusRunningStatsFactory obj's underlying member method code with example usage: obj.__build_offset_df() and returns: offset_df