code: def test_state_dict_integration():
      engine = Engine(lambda e, b: 1)
      data = range(100)
      engine.run(data, max_epochs=10)
      sd = engine.state_dict()
      assert (
          isinstance(sd, Mapping)
          and len(sd) == len(engine._state_dict_all_req_keys) + 1
      )
      assert sd["iteration"] == engine.state.iteration == 10 * 100
      assert sd["epoch_length"] == engine.state.epoch_length == 100
      assert sd["max_epochs"] == engine.state.max_epochs == 10
  
file_path: ignite/tests/ignite/engine/test_engine_state_dict.py
imports: from collections.abc import Mapping
  import pytest
  import torch
  from ignite.engine import Engine, Events, State
  from tests.ignite.engine import BatchChecker, EpochCounter, IterationCounter
label_desc: Use image node_id 3 for calling a global function with example usage: test_state_dict_integration() without return types