code: def test_subplots_hide_axislabels(xlabel_position, ylabel_position):
      axs = plt.figure().subplots(3, 3, sharex=True, sharey=True)
      for (i, j), ax in np.ndenumerate(axs):
          ax.set(xlabel="foo", ylabel="bar")
          ax.xaxis.set_label_position(xlabel_position)
          ax.yaxis.set_label_position(ylabel_position)
          ax.label_outer()
          assert bool(ax.get_xlabel()) == (
              xlabel_position == "bottom"
              and i == 2
              or xlabel_position == "top"
              and i == 0
          )
          assert bool(ax.get_ylabel()) == (
              ylabel_position == "left"
              and j == 0
              or ylabel_position == "right"
              and j == 2
          )
  
imports: import itertools
  import numpy
  import pytest
  from matplotlib.axes import Axes, SubplotBase
  import matplotlib.pyplot
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
label_desc: Use image node_id 12 for calling a global function with example usage: test_subplots_hide_axislabels(xlabel_position, ylabel_position) without return types