code: def _compute_fid(
      mu1: Tensor, sigma1: Tensor, mu2: Tensor, sigma2: Tensor
  ) -> Tensor:
      r"""Compute adjusted version of `Fid Score`_.
  
      The Frechet Inception Distance between two multivariate Gaussians X_x ~ N(mu_1, sigm_1)
      and X_y ~ N(mu_2, sigm_2) is d^2 = ||mu_1 - mu_2||^2 + Tr(sigm_1 + sigm_2 - 2*sqrt(sigm_1*sigm_2)).
  
      Args:
          mu1: mean of activations calculated on predicted (x) samples
          sigma1: covariance matrix over activations calculated on predicted (x) samples
          mu2: mean of activations calculated on target (y) samples
          sigma2: covariance matrix over activations calculated on target (y) samples
  
      Returns:
          Scalar value of the distance between sets.
  
      """
      a = (mu1 - mu2).square().sum(dim=-1)
      b = sigma1.trace() + sigma2.trace()
      c = torch.linalg.eigvals(sigma1 @ sigma2).sqrt().real.sum(dim=-1)
  
      return a + b - 2 * c
  
imports: from copy import deepcopy
  from typing import Any, List, Optional, Sequence, Tuple, Union
  import torch
  from torch import Tensor
  from torch.nn import Module
  from torch.nn.functional import adaptive_avg_pool2d
  from torchmetrics.metric import Metric
  from torchmetrics.utilities.imports import _MATPLOTLIB_AVAILABLE, _TORCH_FIDELITY_AVAILABLE
  from torchmetrics.utilities.plot import _AX_TYPE, _PLOT_OUT_TYPE
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_fid(mu1, sigma1, mu2, sigma2) and returns: unknown