def decode_base58(bc, length):
    n = 0
    for char in bc:
        n = n * 58 + DIGITS58.index(char)
    try:
        return n.to_bytes(length, 'big')
    except __HOLE__:
        return _long_to_bytes(n, length, 'big')
dataset/ETHPy150Open blockcypher/blockcypher-python/blockcypher/utils.py/decode_base58