async def save_changes(self, turn_context: TurnContext, force: bool = False) -> None:
if turn_context == None:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>cached_state = turn_context.turn_state.get(self._context_service_key)<EOL>if force or (cached_state != None and cached_state.is_changed == True):<EOL><INDENT>storage_key = self.get_storage_key(turn_context)<EOL>changes : Dict[str, object] = { storage_key: cached_state.state }<EOL>await self._storage.write(changes)<EOL>cached_state.hash = cached_state.compute_hash(cached_state.state)<EOL><DEDENT>
If it has changed, writes to storage the state object that is cached in the current context object for this turn.
:param turn_context: The context object for this turn.
:param force: Optional. True to save state to storage whether or not there are changes.