code: def test_text():
      fig, ax = plt.subplots()
      ax.text(
          0.1,
          0.1,
          "abcde",
          size=14,
          color="red",
          alpha=0.7,
          rotation=15,
          ha="center",
          va="center",
      )
      rep = fig_to_dict(fig)
      axrep = rep["axes"][0]
      text = axrep["texts"][0]
  
      assert_equal(
          list(sorted(text.keys())),
          [
              "alpha",
              "color",
              "coordinates",
              "fontsize",
              "h_anchor",
              "id",
              "position",
              "rotation",
              "text",
              "v_baseline",
              "zorder",
          ],
      )
      assert_equal(text["alpha"], 0.7)
      assert_equal(text["color"], "#FF0000")
      assert_equal(text["text"], "abcde")
      assert_equal(text["rotation"], -15)
      assert_equal(text["fontsize"], 14)
      assert_equal(text["position"], [0.1, 0.1])
      assert_equal(text["h_anchor"], "middle")
      assert_equal(text["v_baseline"], "central")
      assert_equal(text["zorder"], 3)
      assert_equal(text["coordinates"], "data")
  
file_path: mpld3/mpld3/tests/test_elements.py
imports: import numpy
  import matplotlib.pyplot
  from ..None import fig_to_dict, fig_to_html
  from numpy.testing import assert_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_text() without return types