code: def test_noncont_listed_cmap(vals_missing_plot_list_cmap):
      """An arr with 3 vals (missing the 1, and 5) which requires normalization
      produces creates a legend with 3 handles."""
  
      im_ax, arr = vals_missing_plot_list_cmap
  
      leg = ep.draw_legend(im_ax)
  
      legend_cols = [i.get_facecolor() for i in leg.get_patches()]
      assert len(legend_cols) == len(np.unique(arr))
      plt.close()
  
imports: import numpy
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.colors import ListedColormap
  import earthpy.plot
label_desc: Use image node_id 16 for calling a global function with example usage: test_noncont_listed_cmap(vals_missing_plot_list_cmap) without return types