code: def test_domain_extents():
      # Setting the extent to global or the domain limits.
      ax = plt.axes(projection=ccrs.PlateCarree())
      ax.set_extent((-180, 180, -90, 90))
      assert_array_equal(
          ax.viewLim.get_points(), [[-180, -90], [180, 90]]
      )
      ax.set_extent((-180, 180, -90, 90), ccrs.PlateCarree())
      assert_array_equal(
          ax.viewLim.get_points(), [[-180, -90], [180, 90]]
      )
  
      ax = plt.axes(projection=ccrs.PlateCarree(90))
      ax.set_extent((-180, 180, -90, 90))
      assert_array_equal(
          ax.viewLim.get_points(), [[-180, -90], [180, 90]]
      )
      ax.set_extent((-180, 180, -90, 90), ccrs.PlateCarree(90))
      assert_array_equal(
          ax.viewLim.get_points(), [[-180, -90], [180, 90]]
      )
  
      ax = plt.axes(projection=ccrs.OSGB(approx=False))
      ax.set_extent((0, 7e5, 0, 13e5), ccrs.OSGB(approx=False))
      assert_array_equal(ax.viewLim.get_points(), [[0, 0], [7e5, 13e5]])
  
file_path: cartopy/lib/cartopy/tests/mpl/test_set_extent.py
imports: import matplotlib.pyplot
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import cartopy.crs
label_desc: Use image node_id 3 for calling a global function with example usage: test_domain_extents() without return types