code: def test_with_simulated_bundles():
      streamlines = simulated_bundle(3, False, 2)
      thresholds = [10, 3, 1]
      qbx_class = QuickBundlesX(thresholds)
      tree = qbx_class.cluster(streamlines)
      for level in range(len(thresholds) + 1):
          clusters = tree.get_clusters(level)
  
      assert_equal(tree.leaves[0].indices[0], 0)
      assert_equal(tree.leaves[2][0], 2)
      clusters.refdata = streamlines
  
      assert_array_equal(
          clusters[0][0],
          np.array([[0.0, -10.0, -5.0], [0.0, 10.0, -5.0]]),
      )
  
imports: import itertools
  import numpy
  from numpy.testing import assert_array_equal, assert_equal, assert_raises
  from dipy.segment.clustering import QuickBundlesX, QuickBundles, qbx_and_merge
  from dipy.segment.featurespeed import ResampleFeature
  from dipy.segment.metricspeed import AveragePointwiseEuclideanMetric, MinimumAverageDirectFlipMetric
  from dipy.tracking.streamline import set_number_of_points
  from dipy.tracking.streamline import Streamlines
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 8 for calling a global function with example usage: test_with_simulated_bundles() without return types