code: def test_listedcmap_ncol_equals_nclasses(vals_missing_plot_list_cmap):
      """If a 5 color listed cmap is provided and 6 classes are specified,
      return value error."""
  
      n_classes = 5
      im_ax, arr = vals_missing_plot_list_cmap
  
      with pytest.raises(
          ValueError,
          match="There are more classes than colors in your cmap",
      ):
          ep.draw_legend(im_ax, classes=np.arange(0, n_classes + 1))
      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 19 for calling a global function with example usage: test_listedcmap_ncol_equals_nclasses(vals_missing_plot_list_cmap) without return types