code: def _mutual_info_score_update(
      preds: Tensor, target: Tensor
  ) -> Tensor:
      """Update and return variables required to compute the mutual information score.
  
      Args:
          preds: predicted class labels
          target: ground truth class labels
  
      Returns:
          contingency: contingency matrix
  
      """
      check_cluster_labels(preds, target)
      return calculate_contingency_matrix(preds, target)
  
imports: import torch
  from torch import Tensor, tensor
  from torchmetrics.functional.clustering.utils import calculate_contingency_matrix, check_cluster_labels
label_desc: Use image node_id 1 for calling a global function with example usage: _mutual_info_score_update(preds, target) and returns: calculate_contingency_matrix