code: def _cluster_model_bundle(
      self,
      model_bundle,
      model_clust_thr,
      nb_pts=20,
      select_randomly=500000,
  ):
      if self.verbose:
          t = time()
          logger.info("# Cluster model bundle using QBX")
          logger.info(
              f" Model bundle has {len(model_bundle)} streamlines"
          )
          logger.info(f" Distance threshold {model_clust_thr:0.3f}")
      thresholds = self.start_thr + [model_clust_thr]
  
      model_cluster_map = qbx_and_merge(
          model_bundle,
          thresholds,
          nb_pts=nb_pts,
          select_randomly=select_randomly,
          rng=self.rng,
      )
      model_centroids = model_cluster_map.centroids
      nb_model_centroids = len(model_centroids)
      if self.verbose:
          logger.info(
              f" Model bundle has {nb_model_centroids} centroids"
          )
          logger.info(f" Duration {time() - t:0.3f} s\n")
      return model_centroids
  
imports: from time import time
  from itertools import chain
  import logging
  import numpy
  from dipy.tracking.streamline import set_number_of_points, nbytes, select_random_set_of_streamlines
  from dipy.segment.clustering import qbx_and_merge
  from dipy.tracking.distances import bundles_distances_mdf, bundles_distances_mam
  from dipy.align.streamlinear import StreamlineLinearRegistration, BundleMinDistanceMetric, BundleSumDistanceMatrixMetric, BundleMinDistanceAsymmetricMetric
  from dipy.tracking.streamline import Streamlines, length
  from dipy.utils.deprecator import deprecated_params
  from nibabel.affines import apply_affine
label_desc: Use image node_id 6 for calling the RecoBundles obj's underlying member method code with example usage: obj._cluster_model_bundle(model_bundle, model_clust_thr, nb_pts, select_randomly) and returns: model_centroids