def METHOD_NAME(key, keybase=None):
    if key is None:
        return 0
    kb = 0
    if keybase:
        kb = METHOD_NAME(keybase)
    addone = 0;
    if key[0] == '-':
        addone = 1
    result = 0
    mult = pow(64,len(key)-1-addone)
    for i in range(len(key)-addone):
        result = result + mult * KeyDigits.index(key[i+addone])
        mult = mult / 64
    if addone:
        result = -result
    return result-kb