Why the isinstance check? There's nothing that happens if spawned_tasks is not a list. Also, this bars the use of tuples, which IMO should also be fine.