code: def __inputs_to_embeddings(self, inputs):
      outputs = (
          self.model(
              input_ids=inputs["input_ids"],
              token_type_ids=inputs["token_type_ids"],
              attention_mask=inputs["attention_mask"],
          )
          .last_hidden_state.detach()
          .numpy()
      )
      embeddings = outputs[0][1:-1]
      return embeddings
  
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 8 for calling the CorpusRunningStatsFactory obj's underlying member method code with example usage: obj.__inputs_to_embeddings(inputs) and returns: embeddings