def METHOD_NAME(d):
    return {
        k: (
            Base64String(base64.b64decode(v).decode('utf-8'))
            if wrap
            else base64.b64decode(v)
        )
        if isinstance(v, str)
        else v
        for (k, v) in d.items()
    }