code: def test_classes_provided_as_array(arr_plot_list_cmap):
      """Test that draw_legend works when classes are provided as an arr
      (not a list)."""
  
      im_ax, arr = arr_plot_list_cmap
      n_classes = 5
  
      leg = ep.draw_legend(im_ax, classes=np.arange(n_classes))
  
      legend_cols = [i.get_facecolor() for i in leg.get_patches()]
      assert len(legend_cols) == n_classes
      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 15 for calling a global function with example usage: test_classes_provided_as_array(arr_plot_list_cmap) without return types