code: def test_legend():
      fig = create_plot()
      html = mpld3.fig_to_html(fig)
      plt.close(fig)
  
imports: import matplotlib.pyplot
  import numpy
  import mpld3
  from mpld3 import plugins
label_desc: Use image node_id 2 for calling a global function with example usage: test_legend() without return types