code: def test_scatter():
      fig, ax = plt.subplots()
      ax.scatter(
          np.arange(10),
          np.random.random(10),
          c="r",
          s=30,
          marker="^",
          alpha=0.3,
          lw=2,
          edgecolors="b",
          zorder=10,
      )
      rep = fig_to_dict(fig)
      axrep = rep["axes"][0]
      points = axrep["collections"][0]
  
      assert_equal(
          list(sorted(points.keys())),
          [
              "alphas",
              "edgecolors",
              "edgewidths",
              "facecolors",
              "id",
              "offsetcoordinates",
              "offsets",
              "pathcoordinates",
              "paths",
              "pathtransforms",
              "xindex",
              "yindex",
              "zorder",
          ],
      )
      assert_equal(points["alphas"], [0.3])
      assert_equal(points["zorder"], 10)
      assert_equal(points["edgecolors"], ["rgba(0, 0, 255, 0.3)"])
      assert_equal(points["facecolors"], ["rgba(255, 0, 0, 0.3)"])
      assert_equal(points["edgewidths"], (2.0,))
      assert_equal(
          points["paths"][0][0], [[0.0, 0.5], [-0.5, -0.5], [0.5, -0.5]]
      )
      assert_equal(points["paths"][0][1], ["M", "L", "L", "Z"])
      assert_equal(
          points["pathtransforms"],
          [[7.607257743127308, 0.0, 0.0, 7.607257743127308, 0.0, 0.0]],
      )
  
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 3 for calling a global function with example usage: test_scatter() without return types