code: def test_splines(rng):
      # create a helix
      t = np.linspace(0, 1.75 * 2 * np.pi, 100)
      x = np.sin(t)
      y = np.cos(t)
      z = t
      # add noise
      x += rng.normal(scale=0.1, size=x.shape)
      y += rng.normal(scale=0.1, size=y.shape)
      z += rng.normal(scale=0.1, size=z.shape)
      xyz = np.vstack((x, y, z)).T
      # get the B-splines smoothed result
      tm.spline(xyz, 3, 2, -1)
  
file_path: dipy/dipy/tracking/tests/test_metrics.py
imports: import numpy
  import numpy.testing
  from numpy.testing import assert_equal, assert_array_almost_equal
  from dipy.tracking import metrics
  from dipy.tracking import distances
  from dipy.utils.deprecator import ExpiredDeprecationError
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 2 for calling a global function with example usage: test_splines(rng) without return types