code: def __init__(
      self,
      scorer_function: Optional[
          Callable[[np.array, np.array], np.array]
      ] = None,
      term_scorer: Optional[CorpusBasedTermScorer] = None,
      rank_threshold: int = 10,
      term_scorer_kwargs: Optional[Dict] = None,
      *args,
      **kwargs,
  ):
      super().__init__(*args, **kwargs)
      self.scorer_function = (
          RankDifference().get_scores
          if scorer_function is None
          else scorer_function
      )
      self.term_scorer = term_scorer
      self.rank_threshold = rank_threshold
      self.term_scorer_kwargs = (
          {} if term_scorer_kwargs is None else term_scorer_kwargs
      )
  
file_path: scattertext/scattertext/categorygrouping/rank_embedder.py
imports: from abc import ABCMeta
  from typing import Optional, Callable, Dict
  import numpy
  import pandas
  from scattertext.TermDocMatrix import TermDocMatrix
  from scattertext.termscoring.RankDifference import RankDifference
  from scattertext.termscoring.CorpusBasedTermScorer import CorpusBasedTermScorer
  from scattertext.categorygrouping.characteristic_embedder_base import CategoryEmbedderABC
  from scattertext.util import inherits_from
label_desc: Use image node_id 1 to create a new RankEmbedder object from inherited base classes: CategoryEmbedderABC with example: obj = RankEmbedder(scorer_function, term_scorer, rank_threshold, term_scorer_kwargs)