def _make_tasks_unique(tasks):
        """If some tasks of the workflow are the same they are deep copied."""
        unique_tasks = []
        prev_tasks = set()

        for task in tasks:
            if task in prev_tasks:
                task = copy.deepcopy(task)
            unique_tasks.append(task)

        return unique_tasks
def _make_tasks_unique ( tasks ) : unique_tasks = [ ] prev_tasks = set ( ) for task in tasks : if task in prev_tasks : task = copy . deepcopy ( task ) unique_tasks . append ( task ) return unique_tasks
If some tasks of the workflow are the same they are deep copied.