code: def test_imshow_xarray(binary_string):
      img = np.random.random((20, 30))
      da = xr.DataArray(img, dims=["dim_rows", "dim_cols"])
      fig = px.imshow(da, binary_string=binary_string)
      # Dimensions are used for axis labels and coordinates
      assert fig.layout.xaxis.title.text == "dim_cols"
      assert fig.layout.yaxis.title.text == "dim_rows"
      if not binary_string:
          assert np.all(
              np.array(fig.data[0].x) == np.array(da.coords["dim_cols"])
          )
  
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 12 for calling a global function with example usage: test_imshow_xarray(binary_string) without return types