code: def _cov(
      input_data: torch.Tensor, rowvar: bool = True
  ) -> torch.Tensor:
      """
      Estimate a covariance matrix of the variables.
  
      Args:
          input_data: A 1-D or 2-D array containing multiple variables and observations. Each row of `m` represents a variable,
              and each column a single observation of all those variables.
          rowvar: If rowvar is True (default), then each row represents a variable, with observations in the columns.
              Otherwise, the relationship is transposed: each column represents a variable, while the rows contain
              observations.
      """
      if input_data.dim() < 2:
          input_data = input_data.view(1, -1)
  
      if not rowvar and input_data.size(0) != 1:
          input_data = input_data.t()
  
      factor = 1.0 / (input_data.size(1) - 1)
      input_data = input_data - torch.mean(
          input_data, dim=1, keepdim=True
      )
      return factor * input_data.matmul(input_data.t()).squeeze()
  
file_path: MONAI/monai/metrics/fid.py
imports: from __future__ import annotations
  import numpy
  import torch
  from monai.metrics.metric import Metric
  from monai.utils import optional_import
label_desc: Use image node_id 2 for calling a global function with example usage: _cov(input_data, rowvar) and returns: unknown