code: def _enum_strategy_exact(dist, msg):
      if isinstance(dist, funsor.Tensor):
          dist = dist - dist.reduce(funsor.ops.logaddexp, msg["name"])
      return dist
  
imports: import functools
  import math
  from collections import OrderedDict
  import funsor
  import torch
  import pyro.poutine.runtime
  import pyro.poutine.util
  from pyro.contrib.funsor.handlers.named_messenger import NamedMessenger
  from pyro.contrib.funsor.handlers.primitives import to_data, to_funsor
  from pyro.contrib.funsor.handlers.replay_messenger import ReplayMessenger
  from pyro.contrib.funsor.handlers.trace_messenger import TraceMessenger
  from pyro.poutine.escape_messenger import EscapeMessenger
  from pyro.poutine.subsample_messenger import _Subsample
label_desc: Use image node_id 10 for calling a global function with example usage: _enum_strategy_exact(dist, msg) and returns: dist