class_docstr: A device which executes operations in parallel.
class_docstr_tok: ["A","device","which","executes","operations","in","parallel","."]
docstr: Verifies that tracing is not active.
docstr_tok: ["Verifies","that","tracing","is","not","active","."]
code: def _assert_eager(self):
      """Verifies that tracing is not active."""
      if not context.executing_eagerly():
          raise NotImplementedError(
              "ParallelDevice is currently not supported inside `tf.function`. It "
              "can however run calls to a `tf.function` in parallel:\n\n"
              "with ParallelDevice() as p:\n  f()"
          )
  
imports: import threading
  import weakref
  from tensorflow.python import _pywrap_parallel_device
  from tensorflow.python.distribute import device_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.tpu.ops import tpu_ops
  from tensorflow.python.util import nest
  from tensorflow.python.util import variable_utils
label_desc: Use image node_id 7 for calling the ParallelDevice obj's underlying member method code with example usage: obj._assert_eager() without return types