code: def add(
      self,
      term: str,
      cat: str,
      embedding: np.array,
      add_to_category_embeddings: bool,
  ) -> "CorpusRunningStats":
      if self.embedding_width is None:
          self.embedding_width = len(embedding)
      if term in self.term_stats:
          self.term_stats[term].push(embedding)
      else:
          self.term_cat_stats[term] = {}
          self.term_stats[term] = self._get_fresh_running_stats().push(
              embedding
          )
  
      if add_to_category_embeddings:
          if cat in self.cat_stats:
              self.cat_stats[cat].push(embedding)
          else:
              self.cat_stats[
                  cat
              ] = self._get_fresh_running_stats().push(embedding)
  
      if cat not in self.term_cat_stats[term]:
          self.term_cat_stats[term][
              cat
          ] = self._get_fresh_running_stats()
  
      self.term_cat_stats[term][cat].push(embedding)
      return self
  
file_path: scattertext/scattertext/contextual_embeddings/corpus_runing_stats.py
imports: from typing import Optional
  import numpy
  from scattertext.contextual_embeddings.running_stats_array import RunningStatsArray
label_desc: Use image node_id 2 for calling the CorpusRunningStats obj's underlying member method code with example usage: obj.add(term, cat, embedding, add_to_category_embeddings) and returns: self