code: def _(t, old_shape, new_shape):
      return dist.transforms.ComposeTransform(
          [
              reshape_transform_batch(part, old_shape, new_shape)
              for part in t.parts
          ]
      )
  
imports: import numbers
  from functools import singledispatch
  import torch
  from torch.distributions import transform_to, transforms
  import pyro.distributions
  from pyro.infer.reparam import DiscreteCosineReparam, HaarReparam
  from pyro.poutine.messenger import Messenger
  from pyro.poutine.util import site_is_subsample
  from pyro.primitives import get_param_store
label_desc: Use image node_id 24 for calling a global function with example usage: _(t, old_shape, new_shape) and returns: dist