'Install callback for monitor.
Parameters
callback : function
Takes a string and an NDArrayHandle.
Examples
>>> def mon_callback(*args, **kwargs):
>>>     print("Do your stuff here.")
>>> texe.set_monitor_callback(mon_callback)'

def set_monitor_callback(self, callback):

    cb_type = ctypes.CFUNCTYPE(None, ctypes.c_char_p, NDArrayHandle, ctypes.c_void_p)
    self._monitor_callback = cb_type(_monitor_callback_wrapper(callback))
    check_call(_LIB.MXExecutorSetMonitorCallback(self.handle, self._monitor_callback, None))
