code: def test_old_subplot_compat():
      fig = plt.figure()
      assert isinstance(fig.add_subplot(), SubplotBase)
      assert not isinstance(
          fig.add_axes(rect=[0, 0, 1, 1]), SubplotBase
      )
      with pytest.raises(TypeError):
          Axes(fig, [0, 0, 1, 1], rect=[0, 0, 1, 1])
  
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 18 for calling a global function with example usage: test_old_subplot_compat() without return types