code: def _get_term_doc_counts(self, terms):
      term_counts = []
      if self.scatterchartdata.use_non_text_features:
          term_doc_counts = (
              self.term_doc_matrix.get_metadata_doc_count_df("").loc[
                  terms
              ]
          )
          term_doc_freq = self.term_doc_matrix.get_metadata_freq_df(
              ""
          ).loc[terms]
      else:
          term_doc_counts = self.term_doc_matrix.get_term_doc_count_df(
              ""
          ).loc[terms]
          term_doc_freq = self.term_doc_matrix.get_term_freq_df("").loc[
              terms
          ]
  
      # This should be sped up
      term2idx = pd.Series(np.arange(len(terms)), index=terms)
      for category_i, category in enumerate(
          self.term_doc_matrix.get_categories()
      ):
          term_ser = term_doc_freq[category]
          doc_ser = term_doc_counts[category]
          term_ser = term_ser[term_ser.values > 0]
          doc_ser = doc_ser[doc_ser.values > 0]
          category_counts = pd.Series(
              np.array([term_ser.values, doc_ser.values]).T.tolist(),
              index=term2idx[term_ser.index].values,
          ).to_dict()
          term_counts.append(category_counts)
      return term_counts
  
file_path: scattertext/scattertext/ScatterChartExplorer.py
imports: import logging
  import numpy
  import pandas
  from scattertext.ScatterChart import ScatterChart
  from scattertext.Scalers import percentile_alphabetical
  from scattertext.DocsAndLabelsFromCorpus import DocsAndLabelsFromCorpus, DocsAndLabelsFromCorpusSample
label_desc: Use image node_id 3 for calling the ScatterChartExplorer obj's underlying member method code with example usage: obj._get_term_doc_counts(terms) and returns: term_counts