def METHOD_NAME(early_access, start, end):
    episode_data = []
    episode = Episode.objects.get(pk=start)
    current = start
    while episode is not None:
        if episode.in_development and not early_access:
            break
        levels = []
        minName = None
        maxName = None
        for level in episode.levels:
            level_name = int(level.name)
            if not maxName or level_name > maxName:
                maxName = level_name
            if not minName or level_name < minName:
                minName = level_name
            levels.append(
                {"id": level.id, "name": level_name, "maxScore": max_score(level), "title": get_level_title(level_name)}
            )
        e = {
            "id": episode.id,
            "levels": levels,
            "first_level": minName,
            "last_level": maxName,
            "random_levels_enabled": episode.r_random_levels_enabled,
            "difficulty": episode.difficulty,
        }
        episode_data.append(e)
        episode = episode.next_episode
        current += 1
        if current > end:
            break
    return episode_data