def _accrual_resolve(self, name):
        if name == "latest":
            return CreditAccrualLatest()
        elif name == "average":
            return CreditAccrualAverage()
        elif name == "best":
            return CreditAccrualBest()
        m = re.match("adapt(.*)", name)
        if m: return CreditAccrualAdapt(float(m.group(1)))
        m = re.match("bestlast(.*)", name)
        if m: return CreditAccrualBestLast(int(m.group(1)))
        raise ValueError("Unknown credit accrual operator " + str(name))
Resolve accrual operator names, possibly allowing
dataset/ETHPy150Open pasky/cocopf/credit.py/PopulationCredit._accrual_resolve