code: def broadcast_all(*values, **kwargs):
      """
      Packed broadcasting of multiple tensors.
      """
      inputs = kwargs.get("inputs")
      dims = kwargs.get("dims")
      sizes = {
          dim: size
          for value, old_dims in zip(values, inputs)
          for dim, size in zip(old_dims, value.shape)
      }
      if dims is None:
          dims = "".join(sorted(sizes))
      else:
          assert set(dims) == set(sizes)
      shape = tuple(sizes[dim] for dim in dims)
      values = list(values)
      for i, (x, old_dims) in enumerate(zip(values, inputs)):
          if old_dims != dims:
              x = ops.permute(
                  x,
                  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 = ops.expand(x, shape)
              assert len(x.shape) == len(dims)
              values[i] = x
      return tuple(values)
  
imports: from funsor import ops
label_desc: Use image node_id 1 for calling a global function with example usage: broadcast_all() and returns: tuple