code: def validation_enabled(is_validate: bool = True) -> Iterator[None]:
      """
      Context manager that is useful when temporarily enabling/disabling
      validation checks.
  
      :param bool is_validate: (optional; defaults to True) temporary
          validation check override.
      """
      infer_validation_status = infer.is_validation_enabled()
      distribution_validation_status = dist.is_validation_enabled()
      poutine_validation_status = poutine.is_validation_enabled()
      try:
          enable_validation(is_validate)
          yield
      finally:
          dist.enable_validation(distribution_validation_status)
          infer.enable_validation(infer_validation_status)
          poutine.enable_validation(poutine_validation_status)
  
imports: import copy
  import warnings
  from collections import OrderedDict
  from contextlib import ExitStack, contextmanager
  from inspect import isclass
  from typing import Callable, Iterator, Optional, Sequence, Union
  import torch
  from torch.distributions import constraints
  import pyro.distributions
  import pyro.infer
  import pyro.poutine
  from pyro.distributions.torch_distribution import TorchDistributionMixin
  from pyro.params import param_with_module_name
  from pyro.params.param_store import ParamStoreDict
  from pyro.poutine.plate_messenger import PlateMessenger
  from pyro.poutine.runtime import _MODULE_NAMESPACE_DIVIDER, _PYRO_PARAM_STORE, InferDict, Message, am_i_wrapped, apply_stack, effectful
  from pyro.poutine.subsample_messenger import SubsampleMessenger
  from pyro.util import deep_getattr, set_rng_seed
label_desc: Use image node_id 14 for calling a global function with example usage: validation_enabled(is_validate) without return types