<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_rates(self, rates, base):
 """Local helper function for validating rates response"""


        if "rates" not in rates:
            raise RuntimeError("%s: 'rates' not found in results" % self.name)
        if "base" not in rates or rates["base"] != base or base not in rates["rates"]:
            self.log(logging.WARNING, "%s: 'base' not found in results", self.name)
        self.rates = rates