code: def test_custom_legend_titles(arr_plot_blues):
      """Test that the correct number of custom legend titles plot."""
  
      im_ax, _ = arr_plot_blues
  
      custom_titles = ["one", "two", "three"]
      the_legend = ep.draw_legend(im_ax=im_ax, titles=custom_titles)
  
      assert len(the_legend.get_texts()) == len(
          np.unique(im_ax.get_array().data)
      )
      assert custom_titles == [
          text.get_text() for text in the_legend.get_texts()
      ]
      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 10 for calling a global function with example usage: test_custom_legend_titles(arr_plot_blues) without return types