code: def test_metadata(self):
      corpus = build_hamlet_jz_corpus()
      meta = [
          "one",
          "two",
          "three",
          "four",
          "five",
          "six",
          "seven",
          "eight",
      ]
      j = ScatterChartExplorer(
          corpus, minimum_term_frequency=0
      ).to_dict("hamlet", metadata=meta)
      self.maxDiff = None
      j["docs"]["labels"] = list(j["docs"]["labels"])
      self.assertEqual(
          j["docs"],
          {
              "labels": [0, 0, 0, 0, 1, 1, 1, 1],
              "categories": ["hamlet", "jay-z/r. kelly"],
              "meta": [
                  "one",
                  "two",
                  "three",
                  "four",
                  "five",
                  "six",
                  "seven",
                  "eight",
              ],
              "texts": [
                  "what art thou that usurp'st this time of night,",
                  "together with that fair and warlike form",
                  "in which the majesty of buried denmark",
                  "did sometimes march? by heaven i charge thee, speak!",
                  "halt! who goes there?",
                  "it is i sire tone from brooklyn.",
                  "well, speak up man what is it?",
                  "news from the east sire! the best of both worlds has returned!",
              ],
          },
      )
  
file_path: scattertext/scattertext/test/test_scatterChartExplorer.py
imports: import random
  from unittest import TestCase
  import numpy
  from scattertext.ScatterChartExplorer import ScatterChartExplorer
  from scattertext.test.test_semioticSquare import get_test_corpus
  from scattertext.test.test_termDocMatrixFactory import build_hamlet_jz_corpus, build_hamlet_jz_corpus_with_meta, build_hamlet_jz_corpus_with_alt_text
label_desc: Use image node_id 5 for calling the TestScatterChartExplorer obj's underlying member method code with example usage: obj.test_metadata() without return types