class_docstr: Base class for multi-task Gaussian Likelihoods, supporting general heteroskedastic noise models.
  
  :param num_tasks: Number of tasks.
  :param noise_covar: A model for the noise covariance. This can be a simple homoskedastic noise model, or a GP
      that is to be fitted on the observed measurement errors.
  :param rank: The rank of the task noise covariance matrix to fit. If `rank`
      is set to 0, then a diagonal covariance matrix is fit.
  :param task_correlation_prior: Prior to use over the task noise correlation
      matrix. Only used when :math:`\text{rank} > 0`.
  :param batch_shape: Number of batches.
class_docstr_tok: ["Base","class","for","multi-task","Gaussian","Likelihoods",",","supporting","general","heteroskedastic","noise","models",".",":","param","num_tasks",":","Number","of","tasks",".",":","param","noise_covar",":","A","model","for","the","noise","covariance",".","This","can","be","a","simple","homoskedastic","noise","model",",","or","a","GP","that","is","to","be","fitted","on","the","observed","measurement","errors",".",":","param","rank",":","The","rank","of","the","task","noise","covariance","matrix","to","fit",".","If","`","rank","`","is","set","to","0",",","then","a","diagonal","covariance","matrix","is","fit",".",":","param","task_correlation_prior",":","Prior","to","use","over","the","task","noise","correlation","matrix",".","Only","used","when",":","math",":","`","\\text","{","rank","}",">","0","`",".",":","param","batch_shape",":","Number","of","batches","."]
code: def forward(
      self, function_samples: Tensor, *params: Any, **kwargs: Any
  ) -> Normal:
      noise = self._shaped_noise_covar(
          function_samples.shape, *params, **kwargs
      ).diagonal(dim1=-1, dim2=-2)
      noise = noise.reshape(
          *noise.shape[:-1], *function_samples.shape[-2:]
      )
      return base_distributions.Independent(
          base_distributions.Normal(function_samples, noise.sqrt()), 1
      )
  
imports: from typing import Any, Optional, Union
  import torch
  from linear_operator import to_linear_operator
  from linear_operator.operators import ConstantDiagLinearOperator, DiagLinearOperator, KroneckerProductDiagLinearOperator, KroneckerProductLinearOperator, LinearOperator, RootLinearOperator
  from torch import Tensor
  from torch.distributions import Normal
  from ..constraints import GreaterThan, Interval
  from ..distributions import base_distributions, MultitaskMultivariateNormal
  from ..lazy import LazyEvaluatedKernelTensor
  from ..likelihoods import _GaussianLikelihoodBase, Likelihood
  from ..priors import Prior
  from .noise_models import FixedGaussianNoise, Noise
label_desc: Use image node_id 5 for calling the _MultitaskGaussianLikelihoodBase obj's underlying member method code with example usage: obj.forward(function_samples) and returns: base_distributions