code: def is_recording():
      
      curr = ctypes.c_bool()
      check_call(_LIB.MXAutogradIsRecording(ctypes.byref(curr)))
      return curr.value
docs: Get status on recording/not recording.
  
      Returns
      -------
      Current state of recording.