def METHOD_NAME(request, pk):
    """
    Return a JsonResponse with keys:
    last_updated : utc unix timestamp for the last time the grid was updated
    updates: list of actions since the given timestamp
    """
    grid = get_object_or_404(PlaceGrid, pk=pk)
    if not grid.is_published:
        raise Http404
    # Get only the latest action, created after `last_updated` for each pixel.
    # This is used to incrementally update the grid for the client
    updates = []
    try:
        last_updated = float(request.GET.get("last_updated", 0))
    except (ValueError, TypeError):
        return HttpResponse(status=400)
    grid_timestamp = grid.last_updated.timestamp()
    if grid_timestamp > last_updated:
        # Grid has been updated
        for line in grid.lines.all():
            if line.last_updated.timestamp() > last_updated:
                # Line has been updated
                for pixel in line.pixels.all():
                    if pixel.last_updated.timestamp() > last_updated:
                        # Pixel has been updated
                        # Add the latest action to that pixel to updates
                        action = pixel.latest_action
                        if action is not None:
                            updates.append(extract_action(action))
    return JsonResponse({"last_updated": grid_timestamp, "updates": updates})