code: def transform_fn_factory(target_crs, source_crs):
      """
      Return a function which can be used by ``shapely.op.transform``
      to transform the coordinate points of a geometry.
  
      The function explicitly *does not* do any interpolation or clever
      transformation of the coordinate points, so there is no guarantee
      that the resulting geometry would make any sense.
  
      """
  
      def transform_fn(x, y, z=None):
          new_coords = target_crs.transform_points(
              source_crs, np.asanyarray(x), np.asanyarray(y)
          )
          return new_coords[:, 0], new_coords[:, 1], new_coords[:, 2]
  
      return transform_fn
  
file_path: cartopy/examples/lines_and_polygons/effects_of_the_ellipse.py
imports: from matplotlib.lines import Line2D
  from matplotlib.patheffects import Stroke
  import matplotlib.pyplot
  import numpy
  import shapely.geometry
  from shapely.ops import transform
  import cartopy.crs
  import cartopy.feature
  from cartopy.io.img_tiles import GoogleTiles
label_desc: Use image node_id 1 for calling a global function with example usage: transform_fn_factory(target_crs, source_crs) and returns: transform_fn, new_coords,  new_coords,  new_coords