code: def _enum_strategy_default(dist, msg):
      sample_inputs = OrderedDict(
          (f.name, funsor.Bint[f.size])
          for f in msg["cond_indep_stack"]
          if f.vectorized and f.name not in dist.inputs
      )
      sampled_dist = dist.sample(msg["name"], sample_inputs)
      sampled_dist -= sum(
          [math.log(v.size) for v in sample_inputs.values()], 0
      )
      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 6 for calling a global function with example usage: _enum_strategy_default(dist, msg) and returns: sampled_dist