code: def scale_mvn(mvn, s):
      """
      Transforms a MVN distribution to another MVN distribution according to
  
          scale(mvn(loc, precision), s) := mvn(loc, s * precision).
      """
      assert isinstance(mvn, torch.distributions.MultivariateNormal)
      assert isinstance(s, torch.Tensor)
      batch_shape = broadcast_shape(s.shape, mvn.batch_shape)
      loc = mvn.loc.expand(batch_shape + (-1,))
      # XXX: we might use mvn._unbroadcasted_scale_tril here
      scale_tril = mvn.scale_tril / s.sqrt().unsqueeze(-1).unsqueeze(-1)
      return MultivariateNormal(loc, scale_tril=scale_tril)
  
imports: import math
  import torch
  from torch.distributions.utils import lazy_property
  from torch.nn.functional import pad
  from pyro.distributions.multivariate_studentt import MultivariateStudentT
  from pyro.distributions.torch import MultivariateNormal
  from pyro.distributions.util import broadcast_shape
  from pyro.ops.tensor_utils import precision_to_scale_tril
label_desc: Use image node_id 2 for calling a global function with example usage: scale_mvn(mvn, s) and returns: MultivariateNormal