code: def test_approx_mdl_traj():
      t = np.linspace(0, 1.75 * 2 * np.pi, 100)
      x = np.sin(t)
      y = np.cos(t)
      z = t
      xyz = np.vstack((x, y, z)).T
      xyza1 = pf.approximate_mdl_trajectory(xyz, alpha=1.0)
      xyza2 = pf.approximate_mdl_trajectory(xyz, alpha=2.0)
      assert_equal(len(xyza1), 10)
      assert_equal(len(xyza2), 8)
      assert_array_almost_equal(
          xyza1,
          np.array(
              [
                  [0.00000000e00, 1.00000000e00, 0.00000000e00],
                  [9.39692621e-01, 3.42020143e-01, 1.22173048e00],
                  [6.42787610e-01, -7.66044443e-01, 2.44346095e00],
                  [-5.00000000e-01, -8.66025404e-01, 3.66519143e00],
                  [-9.84807753e-01, 1.73648178e-01, 4.88692191e00],
                  [-1.73648178e-01, 9.84807753e-01, 6.10865238e00],
                  [8.66025404e-01, 5.00000000e-01, 7.33038286e00],
                  [7.66044443e-01, -6.42787610e-01, 8.55211333e00],
                  [-3.42020143e-01, -9.39692621e-01, 9.77384381e00],
                  [-1.00000000e00, -4.28626380e-16, 1.09955743e01],
              ]
          ),
      )
  
      assert_array_almost_equal(
          xyza2,
          np.array(
              [
                  [0.00000000e00, 1.00000000e00, 0.00000000e00],
                  [9.95471923e-01, -9.50560433e-02, 1.66599610e00],
                  [-1.89251244e-01, -9.81928697e-01, 3.33199221e00],
                  [-9.59492974e-01, 2.81732557e-01, 4.99798831e00],
                  [3.71662456e-01, 9.28367933e-01, 6.66398442e00],
                  [8.88835449e-01, -4.58226522e-01, 8.32998052e00],
                  [-5.40640817e-01, -8.41253533e-01, 9.99597663e00],
                  [-1.00000000e00, -4.28626380e-16, 1.09955743e01],
              ]
          ),
      )
  
file_path: dipy/dipy/tracking/tests/test_distances.py
imports: import warnings
  import numpy
  from numpy.testing import assert_array_almost_equal, assert_equal, assert_almost_equal, assert_array_equal
  from dipy.testing import assert_true
  from dipy.testing.decorators import set_random_number_generator
  from dipy.tracking import distances
  from dipy.tracking.streamline import set_number_of_points
  from dipy.data import get_fnames
  from dipy.io.streamline import load_tractogram
label_desc: Use image node_id 6 for calling a global function with example usage: test_approx_mdl_traj() without return types