code: def test_output_handler_with_global_step_transform():
      def global_step_transform(*args, **kwargs):
          return 10
  
      wrapper = OutputHandler(
          "tag",
          output_transform=lambda x: {"loss": x},
          global_step_transform=global_step_transform,
      )
      mock_logger = MagicMock(spec=PolyaxonLogger)
      mock_logger.log_metrics = MagicMock()
  
      mock_engine = MagicMock()
      mock_engine.state = State()
      mock_engine.state.epoch = 5
      mock_engine.state.output = 12345
  
      wrapper(mock_engine, mock_logger, Events.EPOCH_STARTED)
      mock_logger.log_metrics.assert_called_once_with(
          step=10, **{"tag/loss": 12345}
      )
  
file_path: ignite/tests/ignite/contrib/handlers/test_polyaxon_logger.py
imports: import os
  from unittest.mock import call, MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.polyaxon_logger import global_step_from_engine, OptimizerParamsHandler, OutputHandler, PolyaxonLogger
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 6 for calling a global function with example usage: test_output_handler_with_global_step_transform() and returns: int