code: def test_cut_plane():
      dt = np.dtype(np.float32)
      refx = np.array(
          [[0, 0, 0], [1, 0, 0], [2, 0, 0], [3, 0, 0]], dtype=dt
      )
      bundlex = [
          np.array([[0.5, 1, 0], [1.5, 2, 0], [2.5, 3, 0]], dtype=dt),
          np.array([[0.5, 2, 0], [1.5, 3, 0], [2.5, 4, 0]], dtype=dt),
          np.array([[0.5, 1, 1], [1.5, 2, 2], [2.5, 3, 3]], dtype=dt),
          np.array(
              [[-0.5, 2, -1], [-1.5, 3, -2], [-2.5, 4, -3]], dtype=dt
          ),
      ]
      expected_hit0 = [
          [1.0, 1.5, 0.0, 0.70710683, 0.0],
          [1.0, 2.5, 0.0, 0.70710677, 1.0],
          [1.0, 1.5, 1.5, 0.81649661, 2.0],
      ]
      expected_hit1 = [
          [2.0, 2.5, 0.0, 0.70710677, 0.0],
          [2.0, 3.5, 0.0, 0.70710677, 1.0],
          [2.0, 2.5, 2.5, 0.81649655, 2.0],
      ]
      hitx = pf.cut_plane(bundlex, refx)
      assert_array_almost_equal(hitx[0], expected_hit0)
      assert_array_almost_equal(hitx[1], expected_hit1)
      # check that algorithm allows types other than float32
      bundlex[0] = np.asarray(bundlex[0], dtype=np.float64)
      hitx = pf.cut_plane(bundlex, refx)
      assert_array_almost_equal(hitx[0], expected_hit0)
      assert_array_almost_equal(hitx[1], expected_hit1)
      refx = np.asarray(refx, dtype=np.float64)
      hitx = pf.cut_plane(bundlex, refx)
      assert_array_almost_equal(hitx[0], expected_hit0)
      assert_array_almost_equal(hitx[1], expected_hit1)
  
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 11 for calling a global function with example usage: test_cut_plane() without return types