code: def _enum_strategy_full(dist, msg):
      sample_dim_name = "{}__PARTICLES".format(msg["name"])
      sample_inputs = OrderedDict(
          {sample_dim_name: funsor.Bint[msg["infer"]["num_samples"]]}
      )
      sampled_dist = dist.sample(msg["name"], sample_inputs)
      sampled_dist -= math.log(msg["infer"]["num_samples"])
      return sampled_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 9 for calling a global function with example usage: _enum_strategy_full(dist, msg) and returns: sampled_dist