code: def homogeneity_score(preds: Tensor, target: Tensor) -> Tensor:
      """Compute the Homogeneity score between two clusterings.
  
      Args:
          preds: predicted cluster labels
          target: ground truth cluster labels
  
      Returns:
          scalar tensor with the rand score
  
      Example:
          >>> from torchmetrics.functional.clustering import homogeneity_score
          >>> import torch
          >>> homogeneity_score(torch.tensor([0, 0, 1, 1]), torch.tensor([1, 1, 0, 0]))
          tensor(1.)
          >>> homogeneity_score(torch.tensor([0, 0, 1, 2]), torch.tensor([0, 0, 1, 1]))
          tensor(1.)
  
      """
      homogeneity, _, _, _ = _homogeneity_score_compute(preds, target)
      return homogeneity
  
file_path: torchmetrics/src/torchmetrics/functional/clustering/homogeneity_completeness_v_measure.py
imports: from typing import Tuple
  import torch
  from torch import Tensor
  from torchmetrics.functional.clustering.mutual_info_score import mutual_info_score
  from torchmetrics.functional.clustering.utils import calculate_entropy, check_cluster_labels
label_desc: Use image node_id 3 for calling a global function with example usage: homogeneity_score(preds, target) and returns: homogeneity