code: def get_new_doc_categories(
      self,
      category_order: Optional[List[str]] = None,
      number_of_splits: int = 10,
      verbose=False,
  ) -> Tuple[List, List]:
      category_to_bin_dict = self.get_category_group_dict(
          category_order, number_of_splits, verbose
      )
      new_categories = [
          category_to_bin_dict[cat]
          for cat in self.corpus.get_category_names_by_row()
      ]
  
      seen = set()
      new_categories_order = [
          category_to_bin_dict[x]
          for x in category_order
          if not (
              category_to_bin_dict[x] in seen
              or seen.add(category_to_bin_dict[x])
          )
      ]
      return new_categories, new_categories_order
  
file_path: scattertext/scattertext/categorygrouping/characteristic_grouper.py
imports: from typing import List, Optional, Callable, Dict, Tuple
  import pandas
  import numpy
  from scipy.stats import spearmanr
  from tqdm.auto import tqdm
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.categorygrouping.characteristic_embedder_base import CategoryEmbedderABC
  from scattertext.categorygrouping.rank_embedder import RankEmbedder
label_desc: Use image node_id 3 for calling the CharacteristicGrouper obj's underlying member method code with example usage: obj.get_new_doc_categories(category_order, number_of_splits, verbose) and returns: new_categories,  new_categories_order