def METHOD_NAME(level, attempts, student_class=None):
    return {
        "id": level.id,
        "title": level.name,
        "owner": level.owner.user,
        "class": student_class,
        "score": attempts.get(level.id),
        "maxScore": 10,
    }