code: def test_subplots(binned_array):
      """Plot with subplots still has a legend."""
  
      bins, arr_class = binned_array
  
      f, (ax1, ax2) = plt.subplots(2, 1)
      im_ax = ax1.imshow(arr_class)
      ep.draw_legend(im_ax)
  
      im_ax2 = ax2.imshow(arr_class)
      ep.draw_legend(im_ax2)
      plt.close(f)
  
imports: import numpy
  import pytest
  import matplotlib
  import matplotlib.pyplot
  from matplotlib.colors import ListedColormap
  import earthpy.plot
label_desc: Use image node_id 21 for calling a global function with example usage: test_subplots(binned_array) without return types