code: def test_quickbundles_with_not_order_invariant_metric():
      metric = dipysmetric.AveragePointwiseEuclideanMetric()
      qb = QuickBundles(threshold=np.inf, metric=metric)
  
      streamline = np.arange(10 * 3, dtype=dtype).reshape((-1, 3))
      streamlines = [streamline, streamline[::-1]]
  
      clusters = qb.cluster(streamlines)
      assert_equal(len(clusters), 1)
      assert_array_equal(clusters[0].centroid, streamline)
  
file_path: dipy/dipy/segment/tests/test_quickbundles.py
imports: import numpy
  import itertools
  from numpy.testing import assert_array_equal, assert_equal, assert_raises
  from dipy.testing.memory import get_type_refcount
  from dipy.testing import assert_arrays_equal
  from dipy.segment.clustering import QuickBundles
  import dipy.segment.featurespeed
  import dipy.segment.metricspeed
  from dipy.segment.clustering_algorithms import quickbundles
  import dipy.tracking.streamline
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 7 for calling a global function with example usage: test_quickbundles_with_not_order_invariant_metric() without return types