code: def test_origin(binary_string, binary_format):
      for i, img in enumerate([img_rgb, img_gray]):
          fig = px.imshow(
              img,
              origin="lower",
              binary_string=binary_string,
              binary_format=binary_format,
          )
          assert fig.layout.yaxis.autorange is True
          if binary_string and i == 0 and binary_format == "png":
              # The equality below does not hold for jpeg compression since it's lossy
              assert np.all(
                  img[::-1] == decode_image_string(fig.data[0].source)
              )
          if binary_string:
              if binary_format == "jpg":
                  assert fig.data[0].source[:15] == "data:image/jpeg"
              else:
                  assert fig.data[0].source[:14] == "data:image/png"
      fig = px.imshow(img_rgb, binary_string=binary_string)
      assert fig.layout.yaxis.autorange is None
      fig = px.imshow(img_gray, binary_string=binary_string)
      if binary_string:
          assert fig.layout.yaxis.autorange is None
      else:
          assert fig.layout.yaxis.autorange == "reversed"
  
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 5 for calling a global function with example usage: test_origin(binary_string, binary_format) without return types