code: def test_zmax_floats():
      # RGB
      imgs = [
          np.ones((5, 5, 3)),
          1.02 * np.ones((5, 5, 3)),
          2 * np.ones((5, 5, 3)),
          1000 * np.ones((5, 5, 3)),
      ]
      zmaxs = [1, 1, 255, 65535]
      for zmax, img in zip(zmaxs, imgs):
          fig = px.imshow(img, binary_string=False)
          assert fig.data[0]["zmax"] == (zmax, zmax, zmax, 255)
      # single-channel
      imgs = [
          np.ones((5, 5)),
          1.02 * np.ones((5, 5)),
          2 * np.ones((5, 5)),
          1000 * np.ones((5, 5)),
      ]
      for zmax, img in zip(zmaxs, imgs):
          fig = px.imshow(img)
          assert fig.data[0]["zmax"] is None
  
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 9 for calling a global function with example usage: test_zmax_floats() without return types