parameters: (
      app_state: AppState = Depends(get_app_state),
      hardware_api: HardwareControlAPI = Depends(get_hardware),
  )
return_statement: return engine_store
docstring: Get a singleton EngineStore to keep track of created engines / runners.
docstring_summary: Get a singleton EngineStore to keep track of created engines / runners.
docstring_tokens: Get a singleton EngineStore to keep track of created engines / runners .
function: def get_engine_store(
      app_state: AppState = Depends(get_app_state),
      hardware_api: HardwareControlAPI = Depends(get_hardware),
  ) -> EngineStore:
      """Get a singleton EngineStore to keep track of created engines / runners."""
      engine_store = _engine_store.get_from(app_state)
  
      if engine_store is None:
          engine_store = EngineStore(hardware_api=hardware_api)
          _engine_store.set_on(app_state, engine_store)
  
      return engine_store
function_tokens: def get_engine_store ( app_state : AppState = Depends ( get_app_state ) , hardware_api : HardwareControlAPI = Depends ( get_hardware ) , ) -> EngineStore : engine_store = _engine_store . get_from ( app_state ) if engine_store is None : engine_store = EngineStore ( hardware_api = hardware_api ) _engine_store . set_on ( app_state , engine_store ) return engine_store