code: def adjusted_mutual_info_score(
      preds: Tensor,
      target: Tensor,
      average_method: Literal[
          "min", "geometric", "arithmetic", "max"
      ] = "arithmetic",
  ) -> Tensor:
      """Compute adjusted mutual information between two clusterings.
  
      Args:
          preds: predicted cluster labels
          target: ground truth cluster labels
          average_method: normalizer computation method
  
      Returns:
          Scalar tensor with adjusted mutual info score between 0.0 and 1.0
  
      Example:
          >>> from torchmetrics.functional.clustering import adjusted_mutual_info_score
          >>> preds = torch.tensor([2, 1, 0, 1, 0])
          >>> target = torch.tensor([0, 2, 1, 1, 0])
          >>> adjusted_mutual_info_score(preds, target, "arithmetic")
          tensor(-0.2500)
  
      """
      _validate_average_method_arg(average_method)
      contingency = _mutual_info_score_update(preds, target)
      mutual_info = _mutual_info_score_compute(contingency)
      expected_mutual_info = expected_mutual_info_score(
          contingency, target.numel()
      )
      normalizer = calculate_generalized_mean(
          torch.stack(
              [calculate_entropy(preds), calculate_entropy(target)]
          ),
          average_method,
      )
      denominator = normalizer - expected_mutual_info
      if denominator < 0:
          denominator = torch.min(
              torch.tensor(
                  [denominator, -torch.finfo(denominator.dtype).eps]
              )
          )
      else:
          denominator = torch.max(
              torch.tensor(
                  [denominator, torch.finfo(denominator.dtype).eps]
              )
          )
  
      return (mutual_info - expected_mutual_info) / denominator
  
imports: from typing import Literal
  import torch
  from torch import Tensor, tensor
  from torchmetrics.functional.clustering.mutual_info_score import _mutual_info_score_compute, _mutual_info_score_update
  from torchmetrics.functional.clustering.utils import _validate_average_method_arg, calculate_entropy, calculate_generalized_mean
label_desc: Use image node_id 1 for calling a global function with example usage: adjusted_mutual_info_score(preds, target, average_method) and returns: unknown