code: def stop_recording():
      """Stop all gradient recording (backprop and forwardprop)."""
      is_stopped = pywrap_tfe.TFE_Py_TapeSetIsStopped()
      try:
          if not is_stopped:
              pywrap_tfe.TFE_Py_TapeSetStopOnThread()
          yield
      finally:
          if not is_stopped:
              pywrap_tfe.TFE_Py_TapeSetRestartOnThread()
  
file_path: tensorflow/tensorflow/python/eager/record.py
imports: import contextlib
  from tensorflow.python import pywrap_tfe
label_desc: Use image node_id 1 for calling a global function with example usage: stop_recording() without return types