code: def _config_fn(default, expand, num_samples, tmc, site):
      if site["type"] != "sample" or site["is_observed"]:
          return {}
      if type(site["fn"]).__name__ == "_Subsample":
          return {}
      if num_samples is not None:
          return {
              "enumerate": site["infer"].get("enumerate", default),
              "num_samples": site["infer"].get(
                  "num_samples", num_samples
              ),
              "expand": site["infer"].get("expand", expand),
              "tmc": site["infer"].get("tmc", tmc),
          }
      if getattr(site["fn"], "has_enumerate_support", False):
          return {
              "enumerate": site["infer"].get("enumerate", default),
              "expand": site["infer"].get("expand", expand),
          }
      return {}
  
file_path: pyro/pyro/infer/enum.py
imports: import numbers
  from functools import partial
  from queue import LifoQueue
  from pyro import poutine
  from pyro.infer.util import is_validation_enabled
  from pyro.poutine import Trace
  from pyro.poutine.enum_messenger import enumerate_site
  from pyro.poutine.util import prune_subsample_sites
  from pyro.util import check_model_guide_match, check_site_shape, ignore_jit_warnings
label_desc: Use image node_id 5 for calling a global function with example usage: _config_fn(default, expand, num_samples, tmc, site) and returns: dict, dict, dict, dict, dict