code: def test_lox_stability(matmap3d):
      eng = matlab_engine()
  
      if matmap3d:
          if not has_matmap3d(eng):
              pytest.skip("Matmap3d not found")
      else:
          if not has_mapping(eng):
              pytest.skip("Matlab Toolbox not found")
  
      clat, clon, rng = 35.0, 140.0, 50000.0  # arbitrary
  
      for i in range(20):
          for azi in (
              90 + 10.0 ** (-i),
              -90 + 10.0 ** (-i),
              270 + 10.0 ** (-i),
              -270 + 10.0 ** (-i),
          ):
              lat, lon = loxodrome_direct(clat, clon, rng, azi)
  
              lat_matlab, lon_matlab = reckon(
                  eng, matmap3d, clat, clon, rng, azi
              )
  
              assert lat == approx(lat_matlab, rel=0.005)
              assert lon == approx(lon_matlab, rel=0.001)
  
imports: from __future__ import annotations
  import pytest
  from pytest import approx
  from pymap3d.lox import loxodrome_direct
label_desc: Use image node_id 2 for calling a global function with example usage: test_lox_stability(matmap3d) without return types