def extract_action(action):
    """Return a dict containing the relevant fields of a `PlaceAction`"""
    return {
        "x": action.x,
        "y": action.y,
        "color": action.color,
        "time": action.time.timestamp(),  # Unix timestamp
        "username": action.user.username,
    }