code: def test_inject_metadata_descriptions(self):
      tdm = build_hamlet_jz_corpus_with_meta()
      scatter_chart = ScatterChart(
          term_doc_matrix=tdm, minimum_term_frequency=0
      )
      with self.assertRaises(AssertionError):
          scatter_chart.inject_metadata_descriptions(3323)
      if sys.version_info > (3, 0):
          """
          with self.assertRaisesRegex(Exception, 'The following meta data terms are not present: blah'):
              scatter_chart.inject_metadata_descriptions({'blah': 'asjdkflasdjklfsadjk jsdkafsd'})
          with self.assertRaisesRegex(Exception, 'The following meta data terms are not present: cat2'):
              scatter_chart.inject_metadata_descriptions({'cat1': 'asjdkflasdjklfsadjk jsdkafsd', 'cat2': 'asdf'})
          """
      assert (
          scatter_chart
          == scatter_chart.inject_metadata_descriptions(
              {"cat1": "asjdkflasdjklfsadjk jsdkafsd"}
          )
      )
      j = scatter_chart.to_dict("hamlet")
      self.assertEqual(
          set(j.keys()), set(["info", "data", "metadescriptions"])
      )
  
imports: import sys
  from unittest import TestCase
  import numpy
  import pandas
  from scattertext import LogOddsRatioUninformativeDirichletPrior, scale
  from scattertext import ScatterChart
  from scattertext.ScatterChart import CoordinatesNotRightException, TermDocMatrixHasNoMetadataException, NeedToInjectCoordinatesException
  from scattertext.test.test_corpusFromPandasWithoutCategories import get_term_doc_matrix_without_categories
  from scattertext.test.test_semioticSquare import get_test_corpus
  from scattertext.test.test_termDocMatrixFactory import build_hamlet_jz_term_doc_mat, build_hamlet_jz_corpus_with_meta
label_desc: Use image node_id 12 for calling the TestScatterChart obj's underlying member method code with example usage: obj.test_inject_metadata_descriptions() without return types