<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def groupby_task_class(self):
 """ Returns a dictionary mapping the task class to the list of tasks in the flow """

        # 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