def METHOD_NAME(request):
    products = PrepaidProduct.objects.valid()
    total_count = products.count()
    valid_filters = ["prepaid_type", "status", "issuer_name"]
    available_filters = {}
    # Provide valid initial values for the search form so that it is always
    # valid. A blank search will return all products.
    page_number = 1
    search_term = ""
    search_field = "all"
    search_form = SearchForm(
        request.GET,
        initial={
            "q": search_term,
            "search_field": search_field,
            "page": page_number,
        },
    )
    # Get our search results. If the form is not valid, our default search_term
    # and search_field will be used below.
    if search_form.is_valid():
        page_number = search_form.cleaned_data["page"]
        search_field = search_form.cleaned_data["search_field"]
        search_term = search_form.cleaned_data["q"].strip()
        if search_term != "":
            products = search_products(search_term, search_field, products)
    # Get the available filters for products in the search results and then set
    # those filter choices on the filter form
    filters = {}
    available_filters = get_available_filters(products)
    filter_form = FilterForm(request.GET)
    filter_form.set_issuer_name_choices(available_filters["issuer_name"])
    filter_form.set_prepaid_type_choices(available_filters["prepaid_type"])
    filter_form.set_status_choices(available_filters["status"])
    # Filter our products based on the sanitized values from the filter form.
    # If the form is not valid, the products already selected based on the
    # search form will be used below.
    if filter_form.is_valid():
        filters = {
            k: filter_form.cleaned_data[k]
            for k in valid_filters
            if filter_form.cleaned_data[k]
        }
        products = filter_products(filters, products)
    current_count = products.count()
    # Handle pagination
    paginator = Paginator(products.all(), 25)
    page = paginator.get_page(page_number)
    return TemplateResponse(
        request,
        "prepaid_agreements/index.html",
        {
            "current_page": page.number,
            "results": page,
            "total_count": total_count,
            "paginator": paginator,
            "current_count": current_count,
            "filters": filters,
            "query": search_term or "",
            "active_filters": available_filters,
            "valid_filters": valid_filters,
            "search_field": search_field,
            "disclaimer_text": get_disclaimer_text(),
            "support_text": get_support_text(),
        },
    )