code: def _broadcast_shape(existing_shape, new_shape):
      if len(new_shape) < len(existing_shape):
          raise ValueError(
              "Cannot broadcast distribution of shape {} to shape {}".format(
                  existing_shape, new_shape
              )
          )
      reversed_shape = list(reversed(existing_shape))
      expanded_sizes, interstitial_sizes = [], []
      for i, size in enumerate(reversed(new_shape)):
          if i >= len(reversed_shape):
              reversed_shape.append(size)
              expanded_sizes.append((-i - 1, size))
          elif reversed_shape[i] == 1:
              if size != 1:
                  reversed_shape[i] = size
                  interstitial_sizes.append((-i - 1, size))
          elif reversed_shape[i] != size:
              raise ValueError(
                  "Cannot broadcast distribution of shape {} to shape {}".format(
                      existing_shape, new_shape
                  )
              )
      return (
          tuple(reversed(reversed_shape)),
          OrderedDict(expanded_sizes),
          OrderedDict(interstitial_sizes),
      )
  
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 3 for calling the ExpandedDistribution obj's underlying member method code with example usage: obj._broadcast_shape(existing_shape, new_shape) and returns: tuple,  OrderedDict,  OrderedDict