code: def test_LSCv2(verbose=False, rng=None):
      xyz1 = np.array(
          [[1, 0, 0], [2, 0, 0], [3, 0, 0]], dtype="float32"
      )
      xyz2 = np.array(
          [[1, 0, 0], [1, 2, 0], [1, 3, 0]], dtype="float32"
      )
      xyz3 = np.array(
          [[1.1, 0, 0], [1, 2, 0], [1, 3, 0]], dtype="float32"
      )
      xyz4 = np.array(
          [[1, 0, 0], [2.1, 0, 0], [3, 0, 0]], dtype="float32"
      )
  
      xyz5 = np.array(
          [[100, 0, 0], [200, 0, 0], [300, 0, 0]], dtype="float32"
      )
      xyz6 = np.array(
          [[0, 20, 0], [0, 40, 0], [300, 50, 0]], dtype="float32"
      )
  
      T = [xyz1, xyz2, xyz3, xyz4, xyz5, xyz6]
      pf.local_skeleton_clustering(T, 0.2)
  
      pf.local_skeleton_clustering_3pts(T, 0.2)
  
      for i in range(40):
          xyz = rng.random((3, 3), dtype="f4")
          T.append(xyz)
  
      from time import time
  
      t1 = time()
      C3 = pf.local_skeleton_clustering(T, 0.5)
      t2 = time()
      if verbose:
          print(t2 - t1)
          print(len(C3))
  
      t1 = time()
      C4 = pf.local_skeleton_clustering_3pts(T, 0.5)
      t2 = time()
      if verbose:
          print(t2 - t1)
          print(len(C4))
  
      for c in C3:
          assert_equal(np.sum(C3[c]["hidden"] - C4[c]["hidden"]), 0)
  
      T2 = []
      for i in range(10**4):
          xyz = rng.random((10, 3), dtype="f4")
          T2.append(xyz)
      t1 = time()
      C5 = pf.local_skeleton_clustering(T2, 0.5)
      t2 = time()
      if verbose:
          print(t2 - t1)
          print(len(C5))
  
      fname = get_fnames("fornix")
      fornix = load_tractogram(
          fname, "same", bbox_valid_check=False
      ).streamlines
  
      T3 = set_number_of_points(fornix, 6)
  
      if verbose:
          print("lenT3", len(T3))
  
      C = pf.local_skeleton_clustering(T3, 10.0)
  
      if verbose:
          print("lenC", len(C))
  
      """
      try:
          from dipy.viz import window, actor
      except ImportError as e:
          raise pytest.skip('Fails to import dipy.viz due to %s' % str(e))
  
      scene = window.Scene()
      colors = np.zeros((len(C), 3))
      for c in C:
          color = np.random.rand(3)
          for i in C[c]['indices']:
              scene.add(actor.line(T3[i], color))
          colors[c] = color
      window.show(scene)
      scene.clear()
      skeleton = []
  
      def width(w):
          if w<1:
              return 1
          else:
              return w
  
      for c in C:
  
          bundle = [T3[i] for i in C[c]['indices']]
          si,s = pf.most_similar_track_mam(bundle, 'avg')
          skeleton.append(bundle[si])
          actor.label(r,text = str(len(bundle)), pos=(bundle[si][-1]),
                      scale=(2, 2, 2))
          scene.add(actor.line(skeleton, colors, opacity=1,
                           linewidth = width(len(bundle)/10.)))
  
      window.show(scene)
  
      """
  
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 1 for calling a global function with example usage: test_LSCv2(verbose, rng) without return types