class_docstr: Mixin to provide Pyro compatibility for PyTorch distributions.
  
  You should instead use `TorchDistribution` for new distribution classes.
  
  This is mainly useful for wrapping existing PyTorch distributions for
  use in Pyro.  Derived classes must first inherit from
  :class:`torch.distributions.distribution.Distribution` and then inherit
  from :class:`TorchDistributionMixin`.
class_docstr_tok: ["Mixin","to","provide","Pyro","compatibility","for","PyTorch","distributions",".","You","should","instead","use","`","TorchDistribution","`","for","new","distribution","classes",".","This","is","mainly","useful","for","wrapping","existing","PyTorch","distributions","for","use","in","Pyro",".","Derived","classes","must","first","inherit","from",":","class",":","`","torch.distributions.distribution.Distribution","`","and","then","inherit","from",":","class",":","`","TorchDistributionMixin","`","."]
docstr: The tensor shape of samples from this distribution.
  
  Samples are of shape::
  
    d.shape(sample_shape) == sample_shape + d.batch_shape + d.event_shape
  
  :param sample_shape: the size of the iid batch to be drawn from the
      distribution.
  :type sample_shape: torch.Size
  :return: Tensor shape of samples.
  :rtype: torch.Size
code: def shape(self, sample_shape=torch.Size()):
      """
      The tensor shape of samples from this distribution.
  
      Samples are of shape::
  
        d.shape(sample_shape) == sample_shape + d.batch_shape + d.event_shape
  
      :param sample_shape: the size of the iid batch to be drawn from the
          distribution.
      :type sample_shape: torch.Size
      :return: Tensor shape of samples.
      :rtype: torch.Size
      """
      return sample_shape + self.batch_shape + self.event_shape
  
imports: import warnings
  from collections import OrderedDict
  from typing import Callable
  import torch
  from torch.distributions.kl import kl_divergence, register_kl
  import pyro.distributions.torch
  from .None import constraints
  from .distribution import Distribution
  from .score_parts import ScoreParts
  from .util import broadcast_shape, scale_and_mask
label_desc: Use image node_id 5 for calling the TorchDistributionMixin obj's underlying member method code with example usage: obj.shape(sample_shape) and returns: unknown