code: def test_auto_orient_x_and_y(fn, x, y, result):
      series = dict(
          categorical=["a", "a", "b", "b"],
          numerical=[1, 2, 3, 4],
          none=None,
      )
  
      if "none" not in [x, y]:
          assert (
              fn(x=series[x], y=series[y]).data[0].orientation == result
          )
      else:
          if fn == px.histogram or (
              fn == px.bar and "categorical" in [x, y]
          ):
              assert (
                  fn(x=series[x], y=series[y]).data[0].orientation
                  != result
              )
          else:
              assert (
                  fn(x=series[x], y=series[y]).data[0].orientation
                  == result
              )
  
imports: import plotly.express
  import plotly.graph_objects
  import numpy
  import pandas
  import pytest
  from packaging import version
  import unittest.mock
  from plotly.express._core import build_dataframe
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 32 for calling a global function with example usage: test_auto_orient_x_and_y(fn, x, y, result) without return types