Helper method to setup global_step_transform function using another engine.
This can be helpful for logging trainer epoch/iteration while output handler is attached to an evaluator.
Parameters
engine (Engine) – engine which state is used to provide the global step
custom_event_name (Optional[Events]) – registered event name. Optional argument, event name to use.