code: def test_output_handler_state_attrs():
      wrapper = OutputHandler(
          "tag", state_attributes=["alpha", "beta", "gamma"]
      )
      logger = NeptuneLogger(
          project="tests/dry-run",
          mode="debug",
      )
  
      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.23)
      mock_engine.state.gamma = torch.tensor([21.0, 6.0])
  
      wrapper(mock_engine, logger, Events.ITERATION_STARTED)
  
      assert_logger_called_once_with(logger, "tag/alpha", 3.899)
      assert_logger_called_once_with(logger, "tag/beta", 12.23)
      assert_logger_called_once_with(logger, "tag/gamma/0", 21.0)
      assert_logger_called_once_with(logger, "tag/gamma/1", 6.0)
  
      logger.stop()
  
imports: import math
  import warnings
  from unittest.mock import MagicMock
  import pytest
  import torch
  from ignite.contrib.handlers.neptune_logger import global_step_from_engine, GradsScalarHandler, NeptuneLogger, NeptuneSaver, OptimizerParamsHandler, OutputHandler, WeightsScalarHandler
  from ignite.engine import Engine, 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