code: def test_colors(arr_plot_blues):
      """Test that the correct colors appear in the patches of the legend."""
  
      im_ax, _ = arr_plot_blues
      the_legend = ep.draw_legend(im_ax=im_ax)
  
      legend_cols = [
          i.get_facecolor() for i in the_legend.get_patches()
      ]
      # Get the array and cmap from axis object
      cmap_name = im_ax.axes.get_images()[0].get_cmap().name
      unique_vals = np.unique(im_ax.get_array().data)
      image_colors = ep.make_col_list(unique_vals, cmap=cmap_name)
  
      assert image_colors == legend_cols
      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 12 for calling a global function with example usage: test_colors(arr_plot_blues) without return types