<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def overwrite_stage_variables(self, ret, stage_variables):
        '''
        overwrite the given stage_name's stage variables with the given stage_variables
        '''
        res = __salt__['boto_apigateway.overwrite_api_stage_variables'](restApiId=self.restApiId,
                                                                        stageName=self._stage_name,
                                                                        variables=stage_variables,
                                                                        **self._common_aws_args)

        if not res.get('overwrite'):
            ret['result'] = False
            ret['abort'] = True
            ret['comment'] = res.get('error')
        else:
            ret = _log_changes(ret,
                               'overwrite_stage_variables',
                               res.get('stage'))
        return ret