def METHOD_NAME(request):
    """
    Build pushes list, limited to a maximum push id
    """
    query = urllib.parse.parse_qs(urllib.parse.urlparse(request.path_url).query)
    assert int(query["version"][0]) == 2
    start = "startID" in query and int(query["startID"][0]) or (max_push - 8)
    end = "endID" in query and int(query["endID"][0]) or max_push
    assert end > start
    now = time.time()
    resp = {
        "lastpushid": max_push,
        "pushes": {
            push: {
                "changesets": _changesets(push),
                "date": int((now % 1000000) + push * 10),  # fake timestamp
            }
            for push in range(start, end + 1)
            if push <= max_push
        },
    }
    return (200, headers, json.dumps(resp))