code: def test_geodesic_inv__pickle(
      ellipsoid,
      expected_azi12,
      expected_az21,
      expected_dist,
      tmp_path,
      scalar_and_array,
  ):
      geod = Geod(ellps=ellipsoid)
      az12, az21, dist = geod.inv(
          scalar_and_array(_BOSTON_LON),
          scalar_and_array(_BOSTON_LAT),
          scalar_and_array(_PORTLAND_LON),
          scalar_and_array(_PORTLAND_LAT),
      )
      assert_almost_equal(
          (az12, az21, dist),
          (
              scalar_and_array(expected_azi12),
              scalar_and_array(expected_az21),
              scalar_and_array(expected_dist),
          ),
          decimal=3,
      )
      pickle_file = tmp_path / "geod1.pickle"
      with open(pickle_file, "wb") as gp1w:
          pickle.dump(geod, gp1w, -1)
      with open(pickle_file, "rb") as gp1:
          geod_pickle = pickle.load(gp1)
      pickle_az12, pickle_az21, pickle_dist = geod_pickle.inv(
          scalar_and_array(_BOSTON_LON),
          scalar_and_array(_BOSTON_LAT),
          scalar_and_array(_PORTLAND_LON),
          scalar_and_array(_PORTLAND_LAT),
      )
      assert_almost_equal(
          (pickle_az12, pickle_az21, pickle_dist),
          (
              scalar_and_array(expected_azi12),
              scalar_and_array(expected_az21),
              scalar_and_array(expected_dist),
          ),
          decimal=3,
      )
  
imports: import math
  import pickle
  from contextlib import nullcontext
  from itertools import permutations
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from pyproj import Geod
  from pyproj.geod import GeodIntermediateFlag, reverse_azimuth
label_desc: Use image node_id 11 for calling a global function with example usage: test_geodesic_inv__pickle(ellipsoid, expected_azi12, expected_az21, expected_dist, tmp_path, scalar_and_array) without return types