code: def test_transform_points_outside_domain():
      """Test CRS.transform_points with out of domain arrays."""
      # Length-1 arrays error out with a bad status code, while
      # greater than 1 arrays put infinity into the return array
      # where the bad values occur
      crs = ccrs.Orthographic()
      result = crs.transform_points(
          ccrs.PlateCarree(), np.array([-120]), np.array([80])
      )
      assert np.all(np.isnan(result))
      result = crs.transform_points(
          ccrs.PlateCarree(),
          np.array([-120]),
          np.array([80]),
          trap=True,
      )
      assert np.all(np.isnan(result))
      # A length-2 array of the same transform produces "inf" rather
      # than nan due to PROJ never returning nan itself.
      result = crs.transform_points(
          ccrs.PlateCarree(), np.array([-120, -120]), np.array([80, 80])
      )
      assert np.all(~np.isfinite(result[..., :2]))
  
      # Test singular transform to make sure it is producing all nan's
      # the same as the transform_points call with a length-1 array
      result = crs.transform_point(-120, 80, ccrs.PlateCarree())
      assert np.all(np.isnan(result))
  
imports: import copy
  from io import BytesIO
  import os
  from pathlib import Path
  import pickle
  import warnings
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_equal
  from numpy.testing import assert_array_almost_equal
  import pyproj
  import pytest
  import shapely.geometry
  import cartopy.crs
label_desc: Use image node_id 6 for calling a global function with example usage: test_transform_points_outside_domain() without return types