code: def _get_segment_token_embeddings(
      self, segment: spacy.tokens.span.Span
  ) -> np.array:
      inputs = self.tokenizer(str(segment), return_tensors="pt")
      return self.model(**inputs).last_hidden_state.detach().numpy()
  
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 12 for calling the CorpusRunningStatsFactory obj's underlying member method code with example usage: obj._get_segment_token_embeddings(segment) and returns: self