code: def helpful_support_errors(site):
      try:
          yield
      except NotImplementedError as e:
          support_name = repr(site["fn"].support).lower()
          if site["fn"].support.is_discrete:
              name = site["name"]
              raise ValueError(
                  f"Continuous inference cannot handle discrete sample site '{name}'. "
                  "Consider enumerating that variable as documented in "
                  "https://pyro.ai/examples/enumeration.html . "
                  "If you are already enumerating, take care to hide this site when "
                  "constructing an autoguide, e.g. "
                  f"guide = AutoNormal(poutine.block(model, hide=['{name}']))."
              )
          if "sphere" in support_name:
              name = site["name"]
              raise ValueError(
                  f"Continuous inference cannot handle spherical sample site '{name}'. "
                  "Consider using ProjectedNormal distribution together with "
                  "a reparameterizer, e.g. "
                  f"poutine.reparam(config={{'{name}': ProjectedNormalReparam()}})."
              )
          raise e from None
  
file_path: pyro/pyro/infer/autoguide/utils.py
imports: import functools
  from contextlib import contextmanager
  from pyro import poutine
  from pyro.nn.module import PyroModule
label_desc: Use image node_id 5 for calling a global function with example usage: helpful_support_errors(site) without return types