code: def _deferred_assertion_context(is_deferred=True):
      was_deferred = getattr(
          _DEFERRED_ASSERTION_CONTEXT, "is_deferred", False
      )
      _DEFERRED_ASSERTION_CONTEXT.is_deferred = is_deferred
      try:
          yield
      finally:
          _DEFERRED_ASSERTION_CONTEXT.is_deferred = was_deferred
  
imports: import contextlib
  import functools
  import threading
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import type_spec
  from tensorflow.python.framework import type_spec_registry
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.util import tf_inspect
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 3 for calling a global function with example usage: _deferred_assertion_context(is_deferred) without return types