def base64_decode_helper(s):
    try:
        return base64.b64decode(s)
    except TypeError:
        for i in range(1, 5):
            try:
                s_padded = base64.b64decode(s + '='*i)
                return s_padded
            except:
                pass
        raise PappyException("Unable to base64 decode string")
dataset/ETHPy150Open roglew/pappy-proxy/pappyproxy/plugins/decode.py/base64_decode_helper/original