code: def _get_statistics_dataframe(self, term_doc_matrix, non_text):
      tdf = (
          term_doc_matrix.get_metadata_freq_df().sum(axis=1)
          if non_text
          else term_doc_matrix.get_term_freq_df().sum(axis=1)
      )
      gram_df = pd.Series(tdf.index).apply(
          lambda x: pd.Series(list(reversed(x.split())))
      )
      gram_df["c"] = tdf.values
      gram_df["term"] = tdf.index
      gram_df = gram_df.set_index("term")
      unigram_df = gram_df[gram_df[1].isnull()][["c"]]
      ngram_df = gram_df.dropna()
      count_df = pd.merge(
          pd.merge(
              ngram_df,
              unigram_df,
              left_on=0,
              right_index=True,
              suffixes=("", "0"),
          ),
          unigram_df,
          left_on=1,
          right_index=True,
          suffixes=("", "1"),
      )
      p0 = count_df["c0"] / unigram_df["c"].sum()
      p1 = count_df["c1"] / unigram_df["c"].sum()
      p = count_df["c"] / ngram_df["c"].sum()
      count_df["pmi"] = np.log(p / (p0 * p1)) / np.log(2)
      return count_df
  
imports: import numpy
  import pandas
label_desc: Use image node_id 3 for calling the PhraseSelector obj's underlying member method code with example usage: obj._get_statistics_dataframe(term_doc_matrix, non_text) and returns: count_df