def abort_if_user_not_logged_in(profile):
    allowed = True
    try:
        if current_user.id != profile.id:
            abort_json(401, "You can't do this because it's not your profile.")
    except __HOLE__:
        abort_json(405, "You can't do this because you're not logged in.")
dataset/ETHPy150Open Impactstory/total-impact-webapp/totalimpactwebapp/views.py/abort_if_user_not_logged_in