<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_ratefactor(self, base, code):
 """ Return the Decimal currency exchange rate factor of 'code' compared to 1 'base' unit, or RuntimeError Yahoo currently uses USD as base currency, but here we detect it with get_baserate """

        raise RuntimeError("%s Deprecated: API withdrawn in February 2018" % self.name)
        try:
            rate = self.get_rate(code)
        except RuntimeError:
            # fallback
            return self.get_singlerate(base, code)

        self.check_ratebase(rate)
        ratefactor = Decimal(rate['price'])

        if base == self.base:
            return ratefactor
        else:
            return self.ratechangebase(ratefactor, self.base, base)