code: def test_imshow_labels_and_ranges():
      fig = px.imshow(
          [[1, 2], [3, 4], [5, 6]],
      )
      assert fig.layout.xaxis.title.text is None
      assert fig.layout.yaxis.title.text is None
      assert fig.layout.coloraxis.colorbar.title.text is None
      assert fig.data[0].x is None
      assert fig.data[0].y is None
      fig = px.imshow(
          [[1, 2], [3, 4], [5, 6]],
          x=["a", "b"],
          y=["c", "d", "e"],
          labels=dict(x="the x", y="the y", color="the color"),
      )
      # Dimensions are used for axis labels and coordinates
      assert fig.layout.xaxis.title.text == "the x"
      assert fig.layout.yaxis.title.text == "the y"
      assert fig.layout.coloraxis.colorbar.title.text == "the color"
      assert fig.data[0].x[0] == "a"
      assert fig.data[0].y[0] == "c"
  
      with pytest.raises(ValueError):
          fig = px.imshow([[1, 2], [3, 4], [5, 6]], x=["a"])
  
      img = np.ones((2, 2), dtype=np.uint8)
      fig = px.imshow(img, x=["a", "b"])
      assert fig.data[0].x == ("a", "b")
  
      with pytest.raises(ValueError):
          img = np.ones((2, 2, 3), dtype=np.uint8)
          fig = px.imshow(img, x=["a", "b"])
  
      img = np.ones((2, 2), dtype=np.uint8)
      base = datetime.datetime(2000, 1, 1)
      fig = px.imshow(img, x=[base, base + datetime.timedelta(hours=1)])
      assert fig.data[0].x == (
          datetime.datetime(2000, 1, 1, 0, 0),
          datetime.datetime(2000, 1, 1, 1, 0),
      )
  
      with pytest.raises(ValueError):
          img = np.ones((2, 2, 3), dtype=np.uint8)
          base = datetime.datetime(2000, 1, 1)
          fig = px.imshow(
              img, x=[base, base + datetime.timedelta(hours=1)]
          )
  
imports: import plotly.express
  import numpy
  import pytest
  import xarray
  from PIL import Image
  from io import BytesIO
  import base64
  import datetime
  from plotly.express.imshow_utils import rescale_intensity
label_desc: Use image node_id 17 for calling a global function with example usage: test_imshow_labels_and_ranges() without return types