code: def add_cluster_actors(self, tract_idx, streamlines, thr, colors):
      # Saving the tractogram colors in case of reclustering
      if self.__first_time:
          self.__tractogram_colors.append(colors)
  
      print(f"\nClustering threshold {thr}")
      clusters = qbx_and_merge(streamlines, [40, 30, 25, 20, thr])
      self.__tractogram_clusters[tract_idx] = clusters
      centroids = clusters.centroids
      print(f"Total number of centroids = {len(centroids)}")
  
      lengths = [length(c) for c in centroids]
      self.__lengths.extend(lengths)
      lengths = np.array(lengths)
  
      sizes = [len(c) for c in clusters]
      self.__sizes.extend(sizes)
      sizes = np.array(sizes)
      linewidths = np.interp(
          sizes, [np.min(sizes), np.max(sizes)], [0.1, 2.0]
      )
  
      print(f"Minimum number of streamlines in cluster {np.min(sizes)}")
      print(f"Maximum number of streamlines in cluster {np.max(sizes)}")
  
      print("Building cluster actors\n")
      for idx, cent in enumerate(centroids):
          centroid_actor = actor.streamtube(
              [cent], colors, linewidth=linewidths[idx], lod=False
          )
          self.__scene.add(centroid_actor)
  
          cluster_actor = actor.line(clusters[idx][:], lod=False)
          cluster_actor.GetProperty().SetRenderLinesAsTubes(1)
          cluster_actor.GetProperty().SetLineWidth(6)
          cluster_actor.GetProperty().SetOpacity(1)
          cluster_actor.VisibilityOff()
          self.__scene.add(cluster_actor)
  
          # Every centroid actor is paired to a cluster actor
          self.__centroid_actors[centroid_actor] = {
              "actor": cluster_actor,
              "cluster": idx,
              "tractogram": tract_idx,
              "size": sizes[idx],
              "length": lengths[idx],
              "selected": 0,
              "expanded": 0,
          }
  
          self.__cluster_actors[cluster_actor] = {
              "actor": centroid_actor,
              "cluster": idx,
              "tractogram": tract_idx,
              "size": sizes[idx],
              "length": lengths[idx],
              "selected": 0,
              "highlighted": 0,
          }
  
          self.__apply_shader(self.__centroid_actors[centroid_actor])
          self.__apply_shader(self.__cluster_actors[cluster_actor])
  
          if self.__enable_callbacks:
              centroid_actor.AddObserver(
                  "LeftButtonPressEvent",
                  self.__left_click_centroid_callback,
                  1.0,
              )
              cluster_actor.AddObserver(
                  "LeftButtonPressEvent",
                  self.__left_click_cluster_callback,
                  1.0,
              )
  
file_path: dipy/dipy/viz/horizon/visualizer/cluster.py
imports: import numpy
  from dipy.segment.clustering import qbx_and_merge
  from dipy.tracking.streamline import length
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 5 for calling the ClustersVisualizer obj's underlying member method code with example usage: obj.add_cluster_actors(tract_idx, streamlines, thr, colors) without return types