code: def test_geodesic_inv_intermediate__numpy(return_back_azimuth):
      geod = Geod(ellps="clrk66")
      point_count = 5
      lons = numpy.empty(point_count)
      lats = numpy.empty(point_count)
      azis = numpy.empty(point_count)
  
      with pytest.warns(
          UserWarning
      ) if return_back_azimuth is None else nullcontext():
          res = geod.inv_intermediate(
              out_lons=lons,
              out_lats=lats,
              out_azis=azis,
              lon1=_BOSTON_LON,
              lat1=_BOSTON_LAT,
              lon2=_PORTLAND_LON,
              lat2=_PORTLAND_LAT,
              npts=point_count,
              initial_idx=0,
              terminus_idx=0,
              return_back_azimuth=return_back_azimuth,
          )
      assert res.npts == point_count
      assert_almost_equal(res.del_s, 1041048.1770248666)
      assert_almost_equal(res.dist, 4164192.7080994663)
      assert_almost_equal(
          res.lons,
          [
              _BOSTON_LON,
              -83.34061499,
              -96.62666098,
              -110.34292364,
              _PORTLAND_LON,
          ],
      )
      assert_almost_equal(
          res.lats,
          [
              _BOSTON_LAT,
              45.35049848,
              47.01597626,
              47.07350417,
              _PORTLAND_LAT,
          ],
      )
      out_azis = res.azis[:-1]
      if return_back_azimuth in [True, None]:
          out_azis = reverse_azimuth(out_azis)
      assert_almost_equal(
          out_azis,
          [-66.53059479, -75.01125433, -84.6195982, -94.68069764],
      )
      assert res.lons is lons
      assert res.lats is lats
      assert res.azis is azis
  
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 5 for calling a global function with example usage: test_geodesic_inv_intermediate__numpy(return_back_azimuth) without return types