def METHOD_NAME(self, user, password, data):
    validuntil = None
    trafficleft = None
    premium = False
    cache_info = data.get("cache_info", {})
    if user in cache_info:
        validuntil = float(cache_info[user]["vip_end"])
        premium = validuntil > 0
        trafficleft = -1
    return {
        "validuntil": validuntil,
        "trafficleft": trafficleft,
        "premium": premium,
    }