"register_event_handler" used to unregister the handler via
   "unregister_event_handler". This cannot be directly initialized.
torch.monitor.log_event(event: torch._C._monitor.Event) -> None
log_event logs the specified event to all of the registered event
   handlers. It's up to the event handlers to log the event out to the
   corresponding event sink.
If there are no event handlers registered this method is a no-op.
torch.monitor.register_event_handler(callback: Callable[[torch._C._monitor.Event], None]) -> torch._C._monitor.EventHandlerHandle
register_event_handler registers a callback to be called whenever
   an event is logged via "log_event". These handlers should avoid
   blocking the main thread since that may interfere with training as
   they run during the "log_event" call.
torch.monitor.unregister_event_handler(handler: torch._C._monitor.EventHandlerHandle) -> None
unregister_event_handler unregisters the "EventHandlerHandle"