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=TensorboardLogger)
      mock_logger.writer = MagicMock()
  
      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 math
  import os
  from unittest.mock import ANY, call, MagicMock, patch
  import pytest
  import torch
  from ignite.contrib.handlers.tensorboard_logger import global_step_from_engine, GradsHistHandler, GradsScalarHandler, OptimizerParamsHandler, OutputHandler, TensorboardLogger, WeightsHistHandler, 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