class_docstr: Constructs a multi-output multivariate Normal random variable, based on mean and covariance
  Can be multi-output multivariate, or a batch of multi-output multivariate Normal
  
  Passing a matrix mean corresponds to a multi-output multivariate Normal
  Passing a matrix mean corresponds to a batch of multivariate Normals
  
  :param torch.Tensor mean:  An `n x t` or batch `b x n x t` matrix of means for the MVN distribution.
  :param ~linear_operator.operators.LinearOperator covar: An `... x NT x NT` (batch) matrix.
      covariance matrix of MVN distribution.
  :param bool validate_args: (default=False) If True, validate `mean` and `covariance_matrix` arguments.
  :param bool interleaved: (default=True) If True, covariance matrix is interpreted as block-diagonal w.r.t.
      inter-task covariances for each observation. If False, it is interpreted as block-diagonal
      w.r.t. inter-observation covariance for each task.
docstr: Convert a single MVN into a :obj:`~gpytorch.distributions.MultitaskMultivariateNormal`,
  where each task shares the same mean and covariance.
  
  :param ~gpytorch.distributions.MultitaskNormal mvn: The base MVN distribution.
  :param int num_tasks: How many tasks to create.
  :returns: the independent multitask distribution
  :rtype: gpytorch.distributions.MultitaskMultivariateNormal
  
  Example:
      >>> # model is a gpytorch.models.VariationalGP
      >>> # likelihood is a gpytorch.likelihoods.Likelihood
      >>> mean = torch.randn(4, 3)
      >>> covar_factor = torch.randn(4, 3, 3)
      >>> covar = covar_factor @ covar_factor.transpose(-1, -2)
      >>> mvn = gpytorch.distributions.MultivariateNormal(mean, covar)
      >>> print(mvn.event_shape, mvn.batch_shape)
      >>> # torch.Size([3]), torch.Size([4])
      >>>
      >>> mmvn = MultitaskMultivariateNormal.from_repeated_mvn(mvn, num_tasks=2)
      >>> print(mmvn.event_shape, mmvn.batch_shape)
      >>> # torch.Size([3, 2]), torch.Size([4])
docstr_tok: ["Convert","a","single","MVN","into","a",":","obj",":","`","~gpytorch.distributions.MultitaskMultivariateNormal","`",",","where","each","task","shares","the","same","mean","and","covariance",".",":","param","~gpytorch.distributions.MultitaskNormal","mvn",":","The","base","MVN","distribution",".",":","param","int","num_tasks",":","How","many","tasks","to","create",".",":","returns",":","the","independent","multitask","distribution",":","rtype",":","gpytorch.distributions.MultitaskMultivariateNormal","Example",":",">",">",">","#","model","is","a","gpytorch.models.VariationalGP",">",">",">","#","likelihood","is","a","gpytorch.likelihoods.Likelihood",">",">",">","mean","=","torch.randn","(","4",",","3",")",">",">",">","covar_factor","=","torch.randn","(","4",",","3",",","3",")",">",">",">","covar","=","covar_factor","@","covar_factor.transpose","(","-1",",","-2",")",">",">",">","mvn","=","gpytorch.distributions.MultivariateNormal","(","mean",",","covar",")",">",">",">","print","(","mvn.event_shape",",","mvn.batch_shape",")",">",">",">","#","torch.Size","(","[","3","]",")",",","torch.Size","(","[","4","]",")",">",">",">",">",">",">","mmvn","=","MultitaskMultivariateNormal.from_repeated_mvn","(","mvn",",","num_tasks=2",")",">",">",">","print","(","mmvn.event_shape",",","mmvn.batch_shape",")",">",">",">","#","torch.Size","(","[","3",",","2","]",")",",","torch.Size","(","[","4","]",")"]
code: def from_repeated_mvn(cls, mvn, num_tasks):
      """
      Convert a single MVN into a :obj:`~gpytorch.distributions.MultitaskMultivariateNormal`,
      where each task shares the same mean and covariance.
  
      :param ~gpytorch.distributions.MultitaskNormal mvn: The base MVN distribution.
      :param int num_tasks: How many tasks to create.
      :returns: the independent multitask distribution
      :rtype: gpytorch.distributions.MultitaskMultivariateNormal
  
      Example:
          >>> # model is a gpytorch.models.VariationalGP
          >>> # likelihood is a gpytorch.likelihoods.Likelihood
          >>> mean = torch.randn(4, 3)
          >>> covar_factor = torch.randn(4, 3, 3)
          >>> covar = covar_factor @ covar_factor.transpose(-1, -2)
          >>> mvn = gpytorch.distributions.MultivariateNormal(mean, covar)
          >>> print(mvn.event_shape, mvn.batch_shape)
          >>> # torch.Size([3]), torch.Size([4])
          >>>
          >>> mmvn = MultitaskMultivariateNormal.from_repeated_mvn(mvn, num_tasks=2)
          >>> print(mmvn.event_shape, mmvn.batch_shape)
          >>> # torch.Size([3, 2]), torch.Size([4])
      """
      return cls.from_batch_mvn(
          mvn.expand(torch.Size([num_tasks]) + mvn.batch_shape),
          task_dim=0,
      )
  
imports: import torch
  from linear_operator import LinearOperator, to_linear_operator
  from linear_operator.operators import BlockDiagLinearOperator, BlockInterleavedLinearOperator, CatLinearOperator, DiagLinearOperator
  from .multivariate_normal import MultivariateNormal
label_desc: Use image node_id 6 for calling the MultitaskMultivariateNormal obj's underlying member method code with example usage: obj.from_repeated_mvn(cls, mvn, num_tasks) and returns: cls