code: def test_formatter_bad_projection(cls):
      formatter = cls()
      match = r"This formatter cannot be used with non-rectangular projections\."
      with pytest.raises(TypeError, match=match):
          formatter.set_axis(
              Mock(axes=Mock(GeoAxes, projection=ccrs.Orthographic()))
          )
  
imports: from unittest.mock import Mock
  import matplotlib.pyplot
  import numpy
  import pytest
  import cartopy.crs
  from cartopy.mpl.geoaxes import GeoAxes
  from cartopy.mpl.ticker import LatitudeFormatter, LatitudeLocator, LongitudeFormatter, LongitudeLocator
label_desc: Use image node_id 1 for calling a global function with example usage: test_formatter_bad_projection(cls) without return types