code: def eager_independent_delta(delta, reals_var, bint_var, diag_var):
      for i, (name, (point, log_density)) in enumerate(delta.terms):
          if name == diag_var:
              bv = Variable(bint_var, delta.inputs[bint_var])
              point = Lambda(bv, point)
              if bint_var in log_density.inputs:
                  log_density = log_density.reduce(ops.add, bint_var)
              else:
                  log_density = (
                      log_density * delta.inputs[bint_var].dtype
                  )
              new_terms = (
                  delta.terms[:i]
                  + ((reals_var, (point, log_density)),)
                  + delta.terms[i + 1 :]
              )
              return Delta(new_terms)
  
      return None
  
imports: from collections import OrderedDict
  from functools import reduce
  from funsor.domains import Domain, Real
  from funsor.instrument import debug_logged
  from funsor.ops import AddOp, SubOp, TransformOp
  from funsor.registry import KeyedRegistry
  from funsor.terms import Align, Binary, Funsor, FunsorMeta, Independent, Lambda, Number, Unary, Variable, eager, to_funsor
  from funsor.util import get_default_dtype
  from .None import ops
label_desc: Use image node_id 7 for calling a global function with example usage: eager_independent_delta(delta, reals_var, bint_var, diag_var) and returns: None, Delta