class_docstr: Cached operator handle.
docstr: 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.
docstr_tok: ["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","."]
code: 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
      )
  
file_path: mxnet/python/mxnet/_ctypes/cached_op.py
imports: import ctypes
  from ..base import _LIB
  from ..base import c_handle_array
  from ..base import NDArrayHandle, CachedOpHandle, SymbolHandle
  from ..base import check_call
  from ..None import _global_var
  from ..ndarray._internal import NDArrayBase
  from .None import _api_internal
label_desc: Use image node_id 5 for calling the CachedOp obj's underlying member method code with example usage: obj._register_op_hook(callback, monitor_all) without return types