code: def apply_optimizer(x):
      with unfold:
          expr = interpreter.reinterpret(x)
  
      with PrioritizedInterpretation(
          optimize_base, get_interpretation()
      ):
          return interpreter.reinterpret(expr)
  
file_path: funsor/funsor/optimizer.py
imports: import collections
  from opt_einsum.paths import greedy
  import funsor.interpreter
  from funsor.cnf import Contraction
  from funsor.interpretations import DispatchedInterpretation, PrioritizedInterpretation, eager, lazy, normalize_base
  from funsor.interpreter import get_interpretation
  from funsor.ops import DISTRIBUTIVE_OPS, AssociativeOp
  from funsor.terms import Funsor
  from funsor.typing import Variadic
  from .None import ops
label_desc: Use image node_id 6 for calling a global function with example usage: apply_optimizer(x) and returns: interpreter