Given a repetitive manual task, how would you design an automated pipeline to handle it at scale?
Implement schedule_pipeline(tasks, batch_size), where tasks maps each task ID to its prerequisite task IDs.
Return deterministic execution batches, processing available tasks in lexicographic order and never exceeding batch_size; inputs are guaranteed to form a directed acyclic graph.
def schedule_pipeline(tasks, batch_size):