code: def test_subplots_hide_ticklabels(top, bottom, left, right):
      # Ideally, we would also test offset-text visibility (and remove
      # test_subplots_offsettext), but currently, setting rcParams fails to move
      # the offset texts as well.
      with plt.rc_context(
          {
              "xtick.labeltop": top,
              "xtick.labelbottom": bottom,
              "ytick.labelleft": left,
              "ytick.labelright": right,
          }
      ):
          axs = plt.figure().subplots(3, 3, sharex=True, sharey=True)
      for (i, j), ax in np.ndenumerate(axs):
          xtop = ax.xaxis._major_tick_kw["label2On"]
          xbottom = ax.xaxis._major_tick_kw["label1On"]
          yleft = ax.yaxis._major_tick_kw["label1On"]
          yright = ax.yaxis._major_tick_kw["label2On"]
          assert xtop == (top and i == 0)
          assert xbottom == (bottom and i == 2)
          assert yleft == (left and j == 0)
          assert yright == (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 11 for calling a global function with example usage: test_subplots_hide_ticklabels(top, bottom, left, right) without return types