class_docstr: Context manager that generates a trace event in the profiler.
  
  A trace event will start when entering the context, and stop and save the
  result to the profiler when exiting the context. Open TensorBoard Profile tab
  and choose trace viewer to view the trace event in the timeline.
  
  Trace events are created only when the profiler is enabled. More information
  on how to use the profiler can be found at
  https://tensorflow.org/guide/profiler
  
  Example usage:
  ```python
  tf.profiler.experimental.start('logdir')
  for step in range(num_steps):
    # Creates a trace event for each training step with the step number.
    with tf.profiler.experimental.Trace("Train", step_num=step, _r=1):
      train_fn()
  tf.profiler.experimental.stop()
  ```
code: def __exit__(self, exc_type, exc_val, exc_tb):
      if self._traceme:
          self._traceme.Stop()
  
file_path: tensorflow-upstream/tensorflow/python/profiler/trace.py
imports: import functools
  from tensorflow.python.profiler.internal import _pywrap_traceme
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 4 for calling the Trace obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) without return types