code: def test_state_attributes():
      dataloader = [1, 2, 3]
      engine = Engine(MagicMock(return_value=1))
      state = engine.run(dataloader, max_epochs=3)
  
      assert state.iteration == 9
      assert state.output == 1
      assert state.batch == 3
      assert state.dataloader == dataloader
      assert state.epoch == 3
      assert state.max_epochs == 3
      assert state.metrics == {}
  
      with pytest.raises(RuntimeError, match=r"Unknown event name"):
          state.get_event_attrib_value("abc")
  
imports: import functools
  import gc
  from unittest.mock import call, create_autospec, MagicMock
  import pytest
  from pytest import raises
  from ignite.engine import Engine, Events, State
  from ignite.engine.events import EventsList
label_desc: Use image node_id 15 for calling a global function with example usage: test_state_attributes() without return types