parameters: (self, callback, monitor_all=False)
docstring: Install callback for monitor.
  
          Parameters
          ----------
          callback : function
              Takes a string for node_name, string for op_name and a NDArrayHandle.
          monitor_all : bool, default False
              If true, monitor both input _imperative_invoked output, otherwise monitor output only.
docstring_summary: Install callback for monitor.
docstring_tokens: Install callback for monitor .
function: def _register_op_hook(self, callback, monitor_all=False):
          """Install callback for monitor.
  
          Parameters
          ----------
          callback : function
              Takes a string for node_name, string for op_name and a NDArrayHandle.
          monitor_all : bool, default False
              If true, monitor both input _imperative_invoked output, otherwise monitor output only.
          """
          cb_type = ctypes.CFUNCTYPE(None, ctypes.c_char_p, ctypes.c_char_p, NDArrayHandle, ctypes.c_void_p)
          if callback:
              self._monitor_callback = cb_type(_monitor_callback_wrapper(callback))
          callback_ptr = ctypes.cast(self._monitor_callback, ctypes.c_void_p)
          _api_internal.register_op_hook(self.handle, callback_ptr, monitor_all)
function_tokens: def _register_op_hook ( self , callback , monitor_all = False ) : cb_type = ctypes . CFUNCTYPE ( None , ctypes . c_char_p , ctypes . c_char_p , NDArrayHandle , ctypes . c_void_p ) if callback : self . _monitor_callback = cb_type ( _monitor_callback_wrapper ( callback ) ) callback_ptr = ctypes . cast ( self . _monitor_callback , ctypes . c_void_p ) _api_internal . register_op_hook ( self . handle , callback_ptr , monitor_all )