code: def groupby_task_class(self):
          
          # Find all Task classes
          class2tasks = OrderedDict()
          for task in self.iflat_tasks():
              cls = task.__class__
              if cls not in class2tasks: class2tasks[cls] = []
              class2tasks[cls].append(task)
  
          return class2tasks
docs: Returns a dictionary mapping the task class to the list of tasks in the flow