class_docstr: Constructs a multivariate normal random variable, based on mean and covariance.
  Can be multivariate, or a batch of multivariate normals
  
  Passing a vector mean corresponds to a multivariate normal.
  Passing a matrix mean corresponds to a batch of multivariate normals.
  
  :param mean: `... x N` mean of mvn distribution.
  :param covariance_matrix: `... x N X N` covariance matrix of mvn distribution.
  :param validate_args: If True, validate `mean` anad `covariance_matrix` arguments. (Default: False.)
  
  :ivar torch.Size base_sample_shape: The shape of a base sample (without
      batching) that is used to generate a single sample.
  :ivar torch.Tensor covariance_matrix: The covariance matrix, represented as a dense :class:`torch.Tensor`
  :ivar ~linear_operator.LinearOperator lazy_covariance_matrix: The covariance matrix, represented
      as a :class:`~linear_operator.LinearOperator`.
  :ivar torch.Tensor mean: The mean.
  :ivar torch.Tensor stddev: The standard deviation.
  :ivar torch.Tensor variance: The variance.
docstr: Generates a `sample_shape` shaped sample or `sample_shape`
  shaped batch of samples if the distribution parameters
  are batched.
  
  Note that these samples are not reparameterized and therefore cannot be backpropagated through.
  
  :param sample_shape: The number of samples to generate. (Default: `torch.Size([])`.)
  :param base_samples: The `*sample_shape x *batch_shape x N` tensor of
      i.i.d. (or approximately i.i.d.) standard Normal samples to
      reparameterize. (Default: None.)
  :return: A `*sample_shape x *batch_shape x N` tensor of i.i.d. samples.
docstr_tok: ["Generates","a","`","sample_shape","`","shaped","sample","or","`","sample_shape","`","shaped","batch","of","samples","if","the","distribution","parameters","are","batched",".","Note","that","these","samples","are","not","reparameterized","and","therefore","can","not","be","backpropagated","through",".",":","param","sample_shape",":","The","number","of","samples","to","generate",".","(","Default",":","`","torch.Size","(","[","]",")","`",".",")",":","param","base_samples",":","The","`","*","sample_shape","x","*","batch_shape","x","N","`","tensor","of","i.i.d",".","(","or","approximately","i.i.d",".",")","standard","Normal","samples","to","reparameterize",".","(","Default",":","None",".",")",":","return",":","A","`","*","sample_shape","x","*","batch_shape","x","N","`","tensor","of","i.i.d",".","samples","."]
code: def sample(
      self,
      sample_shape: torch.Size = torch.Size(),
      base_samples: Optional[Tensor] = None,
  ) -> Tensor:
      r"""
      Generates a `sample_shape` shaped sample or `sample_shape`
      shaped batch of samples if the distribution parameters
      are batched.
  
      Note that these samples are not reparameterized and therefore cannot be backpropagated through.
  
      :param sample_shape: The number of samples to generate. (Default: `torch.Size([])`.)
      :param base_samples: The `*sample_shape x *batch_shape x N` tensor of
          i.i.d. (or approximately i.i.d.) standard Normal samples to
          reparameterize. (Default: None.)
      :return: A `*sample_shape x *batch_shape x N` tensor of i.i.d. samples.
      """
      with torch.no_grad():
          return self.rsample(
              sample_shape=sample_shape, base_samples=base_samples
          )
  
imports: from __future__ import annotations
  import math
  import warnings
  from numbers import Number
  from typing import Optional, Tuple, Union
  import torch
  from linear_operator import to_dense, to_linear_operator
  from linear_operator.operators import DiagLinearOperator, LinearOperator, RootLinearOperator
  from torch import Tensor
  from torch.distributions import MultivariateNormal
  from torch.distributions.kl import register_kl
  from torch.distributions.utils import _standard_normal, lazy_property
  from ..None import settings
  from ..utils.warnings import NumericalWarning
  from .distribution import Distribution
label_desc: Use image node_id 15 for calling the MultivariateNormal obj's underlying member method code with example usage: obj.sample(sample_shape, base_samples) and returns: self