docstr: Inserts a set of descriptions of meta data terms.  These will be displayed
  below the scatter plot when a meta data term is clicked. All keys in the term dict
  must occur as meta data.
  
  Parameters
  ----------
  term_dict: dict {metadataname: str: 'explanation to insert', ...}
  
  Returns
  -------
  self: ScatterChart
docstr_tok: ["Inserts","a","set","of","descriptions","of","meta","data","terms",".","These","will","be","displayed","below","the","scatter","plot","when","a","meta","data","term","is","clicked",".","All","keys","in","the","term","dict","must","occur","as","meta","data",".","Parameters","--","--","--","--","--","term_dict",":","dict","{","metadataname",":","str",":","'explanation","to","insert","'",",","...","}","Returns","--","--","--","-","self",":","ScatterChart"]
code: def inject_metadata_descriptions(self, term_dict):
      """
      Inserts a set of descriptions of meta data terms.  These will be displayed
      below the scatter plot when a meta data term is clicked. All keys in the term dict
      must occur as meta data.
  
      Parameters
      ----------
      term_dict: dict {metadataname: str: 'explanation to insert', ...}
  
      Returns
      -------
      self: ScatterChart
      """
      assert type(term_dict) == dict
      if not self.term_doc_matrix.metadata_in_use():
          raise TermDocMatrixHasNoMetadataException(
              "No metadata is present in the term document matrix"
          )
      # This doesn't seem necessary. If a definition's not in the corpus, it just won't be shown.
      # if set(term_dict.keys()) - set(self.term_doc_matrix.get_metadata()) != set():
      #    raise Exception('The following meta data terms are not present: '
      #                    + ', '.join(list(set(term_dict.keys()) - set(self.term_doc_matrix.get_metadata()))))
  
      if sys.version_info[0] == 2:
          assert (
              set([type(v) for v in term_dict.values()])
              - set([str, unicode])
              == set()
          )
      else:
          assert (
              set([type(v) for v in term_dict.values()]) - set([str])
              == set()
          )
  
      self.metadata_descriptions = term_dict
      return self
  
imports: import logging
  import sys
  import numpy
  import pandas
  from scipy.stats import rankdata
  from scattertext.PValGetter import get_p_vals
  from scattertext.Scalers import percentile_min, percentile_alphabetical
  from scattertext.ScatterChartData import ScatterChartData
  from scattertext.TermDocMatrixFilter import filter_bigrams_by_pmis, filter_out_unigrams_that_only_occur_in_one_bigram
  from scattertext.termscoring import ScaledFScore
  from scattertext.termscoring.RankDifference import RankDifference
  from scattertext.termscoring.CornerScore import CornerScore
label_desc: Use image node_id 3 for calling the ScatterChart obj's underlying member method code with example usage: obj.inject_metadata_descriptions(term_dict) and returns: self