code: def __embed_segment(self, segment, seg_start, adjust_offsets=True):
      str_segment = str(segment)
      inputs = self.tokenizer(
          str_segment, return_tensors="pt", return_offsets_mapping=True
      )
      subtoken_offsets = (
          inputs["offset_mapping"].cpu().detach().numpy()[0][1:-1]
      )
      embeddings = self.__inputs_to_embeddings(inputs=inputs)
      if adjust_offsets:
          subtoken_offsets_whitespace_stripped = []
          for s, e in subtoken_offsets:
              subtoken = str_segment[s:e]
              s += len(subtoken) - len(subtoken.lstrip())
              e -= len(subtoken) - len(subtoken.rstrip())
              if s != e:
                  subtoken_offsets_whitespace_stripped.append([s, e])
          subtoken_offsets = np.array(
              subtoken_offsets_whitespace_stripped
          )
      return embeddings, subtoken_offsets.T + seg_start
  
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 5 for calling the CorpusRunningStatsFactory obj's underlying member method code with example usage: obj.__embed_segment(segment, seg_start, adjust_offsets) and returns: embeddings,  unknown