libraries/botbuilder-core/botbuilder/core/bot_state.py
async def save_changes(self, turn_context: TurnContext, force: bool = False) -> None:
        """
        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.
        """
        if turn_context == None:
            raise TypeError('BotState.save_changes(): turn_context cannot be None.')
        
        cached_state = turn_context.turn_state.get(self._context_service_key)
        
        if force or (cached_state != None and cached_state.is_changed == True):
            storage_key = self.get_storage_key(turn_context)
            changes : Dict[str, object] = { storage_key: cached_state.state }
            await self._storage.write(changes)
            cached_state.hash = cached_state.compute_hash(cached_state.state)
async def save_changes(self, turn_context: TurnContext, force: bool = False) -> None:
        """
        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.
        """
        if turn_context == None:
            raise TypeError('BotState.save_changes(): turn_context cannot be None.')
        
        cached_state = turn_context.turn_state.get(self._context_service_key)
        
        if force or (cached_state != None and cached_state.is_changed == True):
            storage_key = self.get_storage_key(turn_context)
            changes : Dict[str, object] = { storage_key: cached_state.state }
            await self._storage.write(changes)
            cached_state.hash = cached_state.compute_hash(cached_state.state)
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.