def METHOD_NAME(
    self, request: HttpRequest, view_func, view_args, view_kwargs
) -> HttpResponseBase | None:
    """Check if the endpoint call will violate."""
    with metrics.timer("middleware.ratelimit.process_view"):
        try:
            # TODO: put these fields into their own object
            request.will_be_rate_limited = False
            if settings.SENTRY_SELF_HOSTED:
                return None
            request.rate_limit_category = None
            request.rate_limit_uid = uuid.uuid4().hex
            view_class = getattr(view_func, "view_class", None)
            if not view_class:
                return None
            rate_limit_config = get_rate_limit_config(
                view_class, view_args, {**view_kwargs, "request": request}
            )
            rate_limit_group = (
                rate_limit_config.group if rate_limit_config else RateLimitConfig().group
            )
            request.rate_limit_key = get_rate_limit_key(
                view_func, request, rate_limit_group, rate_limit_config
            )
            if request.rate_limit_key is None:
                return None
            category_str = request.rate_limit_key.split(":", 1)[0]
            request.rate_limit_category = category_str
            rate_limit = get_rate_limit_value(
                http_method=request.method,
                category=RateLimitCategory(category_str),
                rate_limit_config=rate_limit_config,
            )
            if rate_limit is None:
                return None
            request.rate_limit_metadata = above_rate_limit_check(
                request.rate_limit_key, rate_limit, request.rate_limit_uid, rate_limit_group
            )
            # TODO: also limit by concurrent window once we have the data
            rate_limit_cond = (
                request.rate_limit_metadata.rate_limit_type != RateLimitType.NOT_LIMITED
                if settings.ENFORCE_CONCURRENT_RATE_LIMITS
                else request.rate_limit_metadata.rate_limit_type == RateLimitType.FIXED_WINDOW
            )
            if rate_limit_cond:
                request.will_be_rate_limited = True
                enforce_rate_limit = getattr(view_class, "enforce_rate_limit", False)
                if enforce_rate_limit:
                    logger.info(
                        "sentry.api.rate-limit.exceeded",
                        extra={
                            "key": request.rate_limit_key,
                            "url": request.build_absolute_uri(),
                            "limit": request.rate_limit_metadata.limit,
                            "window": request.rate_limit_metadata.window,
                        },
                    )
                    return HttpResponse(
                        json.dumps(
                            DEFAULT_ERROR_MESSAGE.format(
                                limit=request.rate_limit_metadata.limit,
                                window=request.rate_limit_metadata.window,
                            )
                        ),
                        status=429,
                    )
        except Exception:
            logging.exception(
                "Error during rate limiting, failing open. THIS SHOULD NOT HAPPEN"
            )
    return None