def METHOD_NAME(scope, context, ownership, privilege, membership, data):
    if privilege == "admin":
        return True
    rules = list(
        filter(
            lambda r: scope == r["scope"]
            and (r["context"] == "na" or context == r["context"])
            and (r["ownership"] == "na" or ownership == r["ownership"])
            and (
                r["membership"] == "na"
                or ORG_ROLES.index(membership) <= ORG_ROLES.index(r["membership"])
            )
            and GROUPS.index(privilege) <= GROUPS.index(r["privilege"]),
            simple_rules,
        )
    )
    resource = data["resource"]
    rules = list(
        filter(lambda r: not r["limit"] or eval(r["limit"], {"resource": resource}), rules)
    )
    if (
        not is_same_org(data["auth"]["organization"], data["resource"]["organization"])
        and context != "sandbox"
    ):
        return False
    return bool(rules)