docstr: Score the clusters 
docstr_tok: ["Score","the","clusters"]
code: def _compute_score(
      self, all_clusters, backbone_features, semantic_logits
  ):
      """Score the clusters"""
      if self._scorer_type:
          # Assemble batches
          x = []
          coords = []
          batch = []
          pos = []
          for i, cluster in enumerate(all_clusters):
              x.append(backbone_features[cluster])
              coords.append(self.input.coords[cluster])
              batch.append(i * torch.ones(cluster.shape[0]))
              pos.append(self.input.pos[cluster])
          batch_cluster = Data(
              x=torch.cat(x),
              coords=torch.cat(coords),
              batch=torch.cat(batch),
          )
  
          # Voxelise if required
          if self._voxelizer:
              batch_cluster.pos = torch.cat(pos)
              batch_cluster = batch_cluster.to(self.device)
              batch_cluster = self._voxelizer(batch_cluster)
  
          # Score
          batch_cluster = batch_cluster.to("cpu")
          if self._scorer_type == "MLP":
              score_backbone_out = self.ScorerMLP(
                  batch_cluster.x.to(self.device)
              )
              cluster_feats = scatter(
                  score_backbone_out,
                  batch_cluster.batch.long().to(self.device),
                  dim=0,
                  reduce="max",
              )
          elif self._scorer_type == "encoder":
              score_backbone_out = self.ScorerEncoder(batch_cluster)
              cluster_feats = score_backbone_out.x
          else:
              score_backbone_out = self.ScorerUnet(batch_cluster)
              cluster_feats = scatter(
                  score_backbone_out.x,
                  batch_cluster.batch.long().to(self.device),
                  dim=0,
                  reduce="max",
              )
          cluster_scores = self.ScorerHead(cluster_feats).squeeze(-1)
      else:
          # Use semantic certainty as cluster confidence
          with torch.no_grad():
              cluster_semantic = []
              batch = []
              for i, cluster in enumerate(all_clusters):
                  cluster_semantic.append(semantic_logits[cluster, :])
                  batch.append(i * torch.ones(cluster.shape[0]))
              cluster_semantic = torch.cat(cluster_semantic)
              batch = torch.cat(batch)
              cluster_semantic = scatter(
                  cluster_semantic,
                  batch.long().to(self.device),
                  dim=0,
                  reduce="mean",
              )
              cluster_scores = torch.max(cluster_semantic, 1)[0]
      return cluster_scores
  
imports: import torch
  import os
  from torch_points_kernels import region_grow
  from torch_geometric.data import Data
  from torch_scatter import scatter
  import random
  from torch_points3d.datasets.segmentation import IGNORE_LABEL
  from torch_points3d.models.base_model import BaseModel
  from torch_points3d.applications.minkowski import Minkowski
  from torch_points3d.core.common_modules import Seq, MLP, FastBatchNorm1d
  from torch_points3d.core.losses import offset_loss, instance_iou_loss
  from torch_points3d.core.data_transform import GridSampling3D
  from .structures import PanopticLabels, PanopticResults
  from torch_points3d.utils import is_list
label_desc: Use image node_id 5 for calling the PointGroup obj's underlying member method code with example usage: obj._compute_score(all_clusters, backbone_features, semantic_logits) and returns: cluster_scores