docstr: :param doc: spacy.Doc
  :param prefix: str, default is ''
  :return: pd.Series
docstr_tok: [":","param","doc",":","spacy.Doc",":","param","prefix",":","str",",","default","is","``",":","return",":","pd.Series"]
code: def get_doc_metadata(self, doc, prefix=""):
      """
  
      :param doc: spacy.Doc
      :param prefix: str, default is ''
      :return: pd.Series
      """
      out_series = (
          pd.merge(
              pd.DataFrame(
                  pd.Series(
                      [
                          tok.lemma_ if self._use_lemmas else tok.lower_
                          for tok in doc
                      ]
                  ).value_counts(),
                  columns=["count"],
              ),
              self._lexicon_df,
              left_index=True,
              right_index=True,
          )
          .drop(columns=["count"])
          .mean(axis=0)
      )
      if prefix == "":
          return out_series
      return pd.Series(
          out_series.values,
          index=[prefix + x for x in out_series.index],
      )
  
imports: import pandas
  from scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc
label_desc: Use image node_id 2 for calling the FeatsFromScoredLexicon obj's underlying member method code with example usage: obj.get_doc_metadata(doc, prefix) and returns: pd, out_series