code: def test_output_handler_output_transform_sync():
      wrapper = OutputHandler(
          "tag", output_transform=lambda x: x, sync=False
      )
      mock_logger = MagicMock(spec=WandBLogger)
      mock_logger.log = MagicMock()
  
      mock_engine = MagicMock()
      mock_engine.state = State()
      mock_engine.state.output = 12345
      mock_engine.state.iteration = 123
  
      wrapper(mock_engine, mock_logger, Events.ITERATION_STARTED)
  
      mock_logger.log.assert_called_once_with(
          {"tag/output": 12345}, step=123, sync=False
      )
  
      wrapper = OutputHandler(
          "another_tag",
          output_transform=lambda x: {"loss": x},
          sync=True,
      )
      mock_logger = MagicMock(spec=WandBLogger)
      mock_logger.log = MagicMock()
  
      wrapper(mock_engine, mock_logger, Events.ITERATION_STARTED)
      mock_logger.log.assert_called_once_with(
          {"another_tag/loss": 12345}, step=123, sync=True
      )
  
file_path: ignite/tests/ignite/contrib/handlers/test_wandb_logger.py
imports: from unittest.mock import call, MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.wandb_logger import global_step_from_engine, OptimizerParamsHandler, OutputHandler, WandBLogger
  from ignite.engine import Events, State
label_desc: Use image node_id 5 for calling a global function with example usage: test_output_handler_output_transform_sync() without return types