code: def broadcast_all(*values, **kwargs):
      """
      Packed broadcasting of multiple tensors.
      """
      dims = kwargs.get("dims")
      sizes = {
          dim: size
          for value in values
          for dim, size in zip(value._pyro_dims, value.shape)
      }
      if dims is None:
          dims = "".join(sorted(sizes))
      else:
          assert set(dims) == set(sizes)
      shape = torch.Size(sizes[dim] for dim in dims)
      values = list(values)
      for i, x in enumerate(values):
          old_dims = x._pyro_dims
          if old_dims != dims:
              x = x.permute(
                  tuple(
                      old_dims.index(dim)
                      for dim in dims
                      if dim in old_dims
                  )
              )
              x = x.reshape(
                  tuple(
                      sizes[dim] if dim in old_dims else 1
                      for dim in dims
                  )
              )
              x = x.expand(shape)
              x._pyro_dims = dims
              assert x.dim() == len(x._pyro_dims)
              values[i] = x
      return tuple(values)
  
file_path: pyro/pyro/ops/packed.py
imports: import math
  import torch
  from pyro.distributions.util import is_identically_one
  from pyro.util import ignore_jit_warnings
label_desc: Use image node_id 3 for calling a global function with example usage: broadcast_all() and returns: tuple