code: def align_gaussian(new_inputs, old, expand=False):
      """
      Align data of a Gaussian distribution to a new ``inputs`` shape.
      """
      assert isinstance(new_inputs, OrderedDict)
      assert isinstance(old, Gaussian)
      white_vec = old.white_vec
      prec_sqrt = old.prec_sqrt
  
      # Align int inputs.
      # Since these are are managed as in Tensor, we can defer to align_tensor().
      new_ints = OrderedDict(
          (k, d) for k, d in new_inputs.items() if d.dtype != "real"
      )
      old_ints = OrderedDict(
          (k, d) for k, d in old.inputs.items() if d.dtype != "real"
      )
      if new_ints != old_ints:
          white_vec = align_tensor(
              new_ints, Tensor(white_vec, old_ints), expand=expand
          )
          prec_sqrt = align_tensor(
              new_ints, Tensor(prec_sqrt, old_ints), expand=expand
          )
  
      # Align real inputs, which are all concatenated in the rightmost dims.
      new_offsets, new_dim = _compute_offsets(new_inputs)
      old_offsets, old_dim = _compute_offsets(old.inputs)
      assert prec_sqrt.shape[-2:-1] == (old_dim,)
      if new_offsets != old_offsets:
          old_prec_sqrt = ops.transpose(prec_sqrt, -1, -2)
          prec_sqrt = BlockVector(old_prec_sqrt.shape[:-1] + (new_dim,))
          for k, new_offset in new_offsets.items():
              if k not in old_offsets:
                  continue
              offset = old_offsets[k]
              num_elements = old.inputs[k].num_elements
              old_slice = slice(offset, offset + num_elements)
              new_slice = slice(new_offset, new_offset + num_elements)
              prec_sqrt[..., new_slice] = old_prec_sqrt[..., old_slice]
          prec_sqrt = prec_sqrt.as_tensor()
          prec_sqrt = ops.transpose(prec_sqrt, -1, -2)
  
      return white_vec, prec_sqrt
  
imports: import math
  from collections import OrderedDict, defaultdict
  from contextlib import contextmanager
  from functools import reduce
  import funsor.ops
  from funsor.affine import affine_inputs, extract_affine, is_affine
  from funsor.delta import Delta
  from funsor.domains import Real, Reals
  from funsor.interpretations import compress_gaussians
  from funsor.ops import AddOp, SubOp
  from funsor.tensor import Tensor, align_tensor, align_tensors
  from funsor.terms import Binary, Funsor, FunsorMeta, Number, Slice, Subs, Variable, eager, reflect
  from funsor.util import broadcast_shape, get_tracing_state, lazy_property
label_desc: Use image node_id 14 for calling a global function with example usage: align_gaussian(new_inputs, old, expand) and returns: white_vec,  prec_sqrt