code: def test_geodesic_inv_intermediate__azis_flag__numpy(flag):
      geod = Geod(ellps="clrk66")
      point_count = 3
      lons_b = numpy.empty(point_count)
      lats_b = numpy.empty(point_count)
      res = geod.inv_intermediate(
          out_lons=lons_b,
          out_lats=lats_b,
          lon1=_BOSTON_LON,
          lat1=_BOSTON_LAT,
          lon2=_PORTLAND_LON,
          lat2=_PORTLAND_LAT,
          npts=point_count,
          initial_idx=0,
          terminus_idx=0,
          flags=flag,
          return_back_azimuth=False,
      )
      assert res.npts == point_count
      assert_almost_equal(res.del_s, 2082096.3540497331)
      assert_almost_equal(res.dist, 4164192.7080994663)
      assert_almost_equal(
          res.lons, [_BOSTON_LON, -96.62666098, _PORTLAND_LON]
      )
      assert_almost_equal(
          res.lats,
          [_BOSTON_LAT, 47.01597626, _PORTLAND_LAT],
      )
      if flag == GeodIntermediateFlag.AZIS_DISCARD:
          assert res.azis is None
      else:
          assert_almost_equal(
              res.azis,
              [
                  -66.5305947876623,
                  -84.61959820187617,
                  -104.34636584443031,
              ],
          )
      assert res.lons is lons_b
      assert res.lats is lats_b
  
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 4 for calling a global function with example usage: test_geodesic_inv_intermediate__azis_flag__numpy(flag) without return types