def METHOD_NAME(world_files: List[str], format: str, sizelimit: Optional[int]) -> List[Task]:
    tasks: List[Task] = []
    by_module_counts: Dict[int, int] = defaultdict(int)
    for world_file in world_files:
        world = World(world_file, format=format)
        module_count = world.module_count()
        if sizelimit is not None and by_module_counts[module_count] >= sizelimit:
            continue
        by_module_counts[module_count] += 1
        snake_world = World.get_snake_world(module_count)
        tasks.append(Task(world, snake_world))
    return tasks