code: def test_span_cmap_mpl(agg):
      # Get inputs
      x = agg.a
  
      # Get MPL colormap
      cm = pytest.importorskip("matplotlib.cm")
      cmap = cm.viridis
  
      # Build expected solution Data Array
      sol = np.array(
          [
              [0, 4283695428, 4287524142],
              [4287143710, 0, 4282832267],
              [4280213706, 4280608765, 0],
          ]
      )
      sol = tf.Image(sol, coords=coords, dims=dims)
  
      # Check span
      check_span(x, cmap, "log", sol)
  
imports: from __future__ import annotations
  from io import BytesIO
  import numpy
  import xarray
  import dask.array
  import PIL
  import pytest
  import datashader.transfer_functions
  from datashader.tests.test_pandas import assert_eq_ndarray, assert_eq_xr, assert_image_close
label_desc: Use image node_id 8 for calling a global function with example usage: test_span_cmap_mpl(agg) without return types