code: def test_alternative_text(self):
      corpus = build_hamlet_jz_corpus_with_alt_text()
      j = ScatterChartExplorer(
          corpus, minimum_term_frequency=0
      ).to_dict("hamlet", alternative_text_field="alt")
      self.assertEqual(
          j["docs"]["texts"][0], j["docs"]["texts"][0].upper()
      )
  
      j = ScatterChartExplorer(
          corpus, minimum_term_frequency=0
      ).to_dict("hamlet")
      self.assertNotEqual(
          j["docs"]["texts"][0], j["docs"]["texts"][0].upper()
      )
  
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 6 for calling the TestScatterChartExplorer obj's underlying member method code with example usage: obj.test_alternative_text() without return types