code: def test_output_handler_state_attrs():
      wrapper = OutputHandler(
          "tag", state_attributes=["alpha", "beta", "gamma", "delta"]
      )
      mock_logger = MagicMock(spec=WandBLogger)
      mock_logger.log = MagicMock()
  
      mock_engine = MagicMock()
      mock_engine.state = State()
      mock_engine.state.iteration = 5
      mock_engine.state.alpha = 3.899
      mock_engine.state.beta = torch.tensor(12.21)
      mock_engine.state.gamma = torch.tensor([21.0, 6.0])
      mock_engine.state.delta = "Some Text"
  
      wrapper(mock_engine, mock_logger, Events.ITERATION_STARTED)
  
      mock_logger.log.assert_called_once_with(
          {
              "tag/alpha": 3.899,
              "tag/beta": torch.tensor(12.21).item(),
              "tag/gamma/0": 21.0,
              "tag/gamma/1": 6.0,
              "tag/delta": "Some Text",
          },
          step=5,
          sync=None,
      )
  
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 11 for calling a global function with example usage: test_output_handler_state_attrs() without return types