code: def test_spine_nonlinear_data_positions(fig_test, fig_ref):
      plt.style.use("default")
  
      ax = fig_test.add_subplot()
      ax.set(xscale="log", xlim=(0.1, 1))
      # Use position="data" to visually swap the left and right spines, using
      # linewidth to distinguish them.  The calls to tick_params removes labels
      # (for image comparison purposes) and harmonizes tick positions with the
      # reference).
      ax.spines.left.set_position(("data", 1))
      ax.spines.left.set_linewidth(2)
      ax.spines.right.set_position(("data", 0.1))
      ax.tick_params(axis="y", labelleft=False, direction="in")
  
      ax = fig_ref.add_subplot()
      ax.set(xscale="log", xlim=(0.1, 1))
      ax.spines.right.set_linewidth(2)
      ax.tick_params(axis="y", labelleft=False, left=False, right=True)
  
file_path: matplotlib/lib/matplotlib/tests/test_spines.py
imports: import numpy
  import pytest
  import matplotlib.pyplot
  from matplotlib.spines import Spines
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
label_desc: Use image node_id 4 for calling a global function with example usage: test_spine_nonlinear_data_positions(fig_test, fig_ref) without return types