code: def set_term_ranker(self, term_ranker) -> "CorpusBasedTermScorer":
      if inherits_from(term_ranker, "TermRanker"):
          self.term_ranker_ = term_ranker(self.corpus_)
      else:
          self.term_ranker_ = term_ranker
      assert isinstance(self.term_ranker_, TermRanker)
      if self.use_metadata_:
          self.term_ranker_.use_non_text_features()
      return self
  
imports: from abc import ABCMeta, abstractmethod
  from typing import Tuple
  import numpy
  import pandas
  from scattertext.ParsedCorpus import ParsedCorpus
  from scipy import stats
  from scipy.sparse import vstack
  from scattertext.util import inherits_from
  from scattertext.termranking import AbsoluteFrequencyRanker
  from scattertext.termranking.TermRanker import TermRanker
label_desc: Use image node_id 10 for calling the CorpusBasedTermScorer obj's underlying member method code with example usage: obj.set_term_ranker(term_ranker) and returns: self