code: def test_geodesic_npts(include_initial, include_terminus):
      geod = Geod(ellps="clrk66")
      initial_idx = int(not include_initial)
      terminus_idx = int(not include_terminus)
      lonlats = geod.npts(
          _BOSTON_LON,
          _BOSTON_LAT,
          _PORTLAND_LON,
          _PORTLAND_LAT,
          npts=6 - initial_idx - terminus_idx,
          initial_idx=initial_idx,
          terminus_idx=terminus_idx,
      )
      expected_lonlats = [
          (-80.797, 44.837),
          (-91.218, 46.536),
          (-102.106, 47.236),
          (-113.066, 46.888),
      ]
      if include_initial:
          expected_lonlats.insert(0, (_BOSTON_LON, _BOSTON_LAT))
      if include_terminus:
          expected_lonlats.append((_PORTLAND_LON, _PORTLAND_LAT))
      assert_almost_equal(lonlats, expected_lonlats, 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 9 for calling a global function with example usage: test_geodesic_npts(include_initial, include_terminus) without return types