def METHOD_NAME(request):
    response = {}
    last_modified_onclient = int(request.POST["last_modified"])
    number_of_entries_onclient = int(request.POST["number_of_entries"])
    aggregation_values = Entry.objects.filter(
        entry_owner=request.user.id
    ).aggregate(Max("last_modified"), Count("id"))
    last_modified__max = aggregation_values["last_modified__max"]
    number_of_entries_onserver = aggregation_values["id__count"]
    if last_modified__max:
        last_modified_onserver = int(
            time.mktime(last_modified__max.timetuple())
        )
    else:
        last_modified_onserver = 0
    if (
        last_modified_onclient < last_modified_onserver
        or number_of_entries_onclient > number_of_entries_onserver
        or request.user.id != int(request.POST["user_id"])
    ):
        response["bib_list"] = serializer.serialize(
            Entry.objects.filter(entry_owner=request.user),
            fields=("entry_key", "entry_owner", "bib_type", "cats", "fields"),
        )
        response["last_modified"] = last_modified_onserver
        response["number_of_entries"] = number_of_entries_onserver
    response["bib_categories"] = serializer.serialize(
        EntryCategory.objects.filter(category_owner=request.user)
    )
    response["user_id"] = request.user.id
    status = 200
    return JsonResponse(response, status=status)