code: def test_neg_vals():
      """Test that the legend plots when positive and negative values are
      provided."""
  
      arr = np.array([[-1, 0, 1], [1, 0, -1]])
      f, ax = plt.subplots()
      im_ax = ax.imshow(arr)
  
      leg_neg = ep.draw_legend(im_ax)
      legend_cols = [i.get_facecolor() for i in leg_neg.get_patches()]
      assert len(legend_cols) == len(np.unique(arr))
      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 13 for calling a global function with example usage: test_neg_vals() without return types