def METHOD_NAME(request, **kwargs):
    """
    Append or update the page number in a querystring.
    """
    querydict = request.GET.copy()
    for k, v in kwargs.items():
        if v is not None:
            querydict[k] = v
        elif k in querydict:
            querydict.pop(k)
    METHOD_NAME = querydict.urlencode(safe="/")
    return "?" + METHOD_NAME if METHOD_NAME else ""