code: def test_output_handler_with_wrong_global_step_transform_output():
      def global_step_transform(*args, **kwargs):
          return "a"
  
      wrapper = OutputHandler(
          "tag",
          output_transform=lambda x: {"loss": x},
          global_step_transform=global_step_transform,
      )
      mock_logger = MagicMock(spec=VisdomLogger)
      mock_logger.vis = MagicMock()
      mock_logger.executor = _DummyExecutor()
  
      mock_engine = MagicMock()
      mock_engine.state = State()
      mock_engine.state.epoch = 5
      mock_engine.state.output = 12345
  
      with pytest.raises(TypeError, match="global_step must be int"):
          wrapper(mock_engine, mock_logger, Events.EPOCH_STARTED)
  
imports: import sys
  from unittest.mock import ANY, call, MagicMock, patch
  import pytest
  import torch
  from ignite.contrib.handlers.visdom_logger import _DummyExecutor, global_step_from_engine, GradsScalarHandler, OptimizerParamsHandler, OutputHandler, VisdomLogger, WeightsScalarHandler
  from ignite.engine import Engine, Events, State
label_desc: Use image node_id 8 for calling a global function with example usage: test_output_handler_with_wrong_global_step_transform_output() and returns: str