def METHOD_NAME(info, **kwargs):
    user = info.context.request.user
    org_id = kwargs.get("id") or kwargs.get("org_id")
    org = (
        models.Organization.objects.filter(id=org_id, is_active=True).first()
        if org_id
        else getattr(info.context.request, "org", None)
    )
    org_user = org.organization_users.filter(user=user).first() if org else None
    if user.is_anonymous:
        raise exceptions.NotAuthenticated()
    if org is None:
        raise exceptions.NotFound("No active organization found")
    if not all(
        [
            OrganizationUserRole[role] in getattr(org_user, "roles", [])
            for role in roles
        ]
    ):
        raise exceptions.PermissionDenied()
    kwargs.update({"org": org})
    return func(info, **kwargs)