class_docstr: The abstract interface of execution engine.
  
  Execution engine is responsible for *executing* the submitted models.
  The engine has the freedom to choose the execution environment. For example,
  whether to execute it instantly in the current process, or send it to NNI training service (e.g., local / remote).
  It may also optimize the workloads with techniques like CSE, or even doing benchmark queries.
  
  Note that some engines might reply on certain model space formats.
  For example, some engines might require the model space to be a graph, to do certain optimizations.
  
  Every subclass of class:`ExecutableModelSpace` has its general logic (i.e., code) of execution
  defined in its class. But the interpretation of the logic depends on the engine itself.
  
  In synchronized use case, the strategy will have a loop to call `submit_models` and `wait_models` repeatedly,
  and will receive metrics from `ExecutableModelSpace` attributes.
  Execution engine could assume that strategy will only submit graph when there are available resources (for now).
  
  In asynchronized use case, the strategy will register a listener to receive events,
  while still using `submit_models` to train.
  
  There might be some util functions benefit all optimizing methods,
  but non-mandatory utils should not be covered in abstract interface.
docstr: Return the state of the engine.
  
  The state is used to resume the engine.
docstr_tok: ["Return","the","state","of","the","engine",".","The","state","is","used","to","resume","the","engine","."]
code: def state_dict(self) -> dict:
      """Return the state of the engine.
  
      The state is used to resume the engine.
      """
      raise NotImplementedError(
          f"Engine {self.__class__.__name__} did not implement `state_dict`."
      )
  
imports: from __future__ import annotations
  import logging
  import time
  from collections import defaultdict
  from typing import Any, Iterable, NewType, Callable, Type, overload
  from nni.nas.space import ExecutableModelSpace, ModelStatus
  from .event import ModelEvent, ModelEventType, FinalMetricEvent, IntermediateMetricEvent, TrainingEndEvent
label_desc: Use image node_id 17 for calling the ExecutionEngine obj's underlying member method code with example usage: obj.state_dict() without return types