code: def test_output_handler_state_attrs():
      wrapper = OutputHandler(
          "tag", state_attributes=["alpha", "beta", "gamma"]
      )
      mock_logger = MagicMock(spec=MLflowLogger)
      mock_logger.log_metrics = 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])
  
      wrapper(mock_engine, mock_logger, Events.ITERATION_STARTED)
  
      mock_logger.log_metrics.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,
          },
          step=5,
      )
  
file_path: ignite/tests/ignite/contrib/handlers/test_mlflow_logger.py
imports: import sys
  from unittest.mock import call, MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.mlflow_logger import global_step_from_engine, MLflowLogger, OptimizerParamsHandler, OutputHandler
  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_state_attrs() without return types