code: def elbo_contract(state, sum_op, prod_op, reduced_vars, terms):
      if reduced_vars.isdisjoint(state.approx_vars):
          return None
      if reduced_vars != state.approx_vars:
          raise NotImplementedError("TODO")
  
      model = reduce(prod_op, terms)
      return Integrate(
          state.guide, model - state.guide, state.approx_vars
      )
  
file_path: funsor/funsor/elbo.py
imports: from functools import reduce
  from multipledispatch.variadic import Variadic
  from funsor.cnf import Contraction
  from funsor.integrate import Integrate
  from funsor.interpretations import StatefulInterpretation
  from funsor.ops import AddOp, LogaddexpOp, NullOp
  from funsor.terms import Funsor, Reduce
  from .None import ops
label_desc: Use image node_id 1 for calling a global function with example usage: elbo_contract(state, sum_op, prod_op, reduced_vars, terms) and returns: Integrate, None