docstr: Check that one sleep op works in isolation.
  
  See sleep_bin.py for an example of how the synchronous and asynchronous
  sleep ops differ in behavior.
  
  Args:
    op: The sleep op, either sleep_op.SyncSleep or sleep_op.AsyncSleep.
code: def _check_sleep(self, op):
      """Check that one sleep op works in isolation.
  
      See sleep_bin.py for an example of how the synchronous and asynchronous
      sleep ops differ in behavior.
  
      Args:
        op: The sleep op, either sleep_op.SyncSleep or sleep_op.AsyncSleep.
      """
      delay = 0.3  # delay in seconds
      start_t = time.time()
      func = tf.function(lambda: op(delay))
      results = self.evaluate(func())
      end_t = time.time()
      delta_t = end_t - start_t
      self.assertEqual(results.shape, tuple())
      self.assertGreater(delta_t, 0.9 * delay)
  
file_path: tensorflow/tensorflow/examples/custom_ops_doc/sleep/sleep_test.py
imports: import time
  import tensorflow
  from tensorflow.examples.custom_ops_doc.sleep import sleep_op
  from tensorflow.python.framework import errors_impl
label_desc: Use image node_id 1 for calling the SleepTest obj's underlying member method code with example usage: obj._check_sleep(op) without return types