def get_tasks(self, thread_name):
if thread_name not in self.tasks_by_thread:<EOL><INDENT>with self._tasks_lock:<EOL><INDENT>self.tasks_by_thread[thread_name] = OrderedDict()<EOL><DEDENT><DEDENT>return self.tasks_by_thread[thread_name]<EOL>
Args:
    thread_name (str): name of the thread to get the tasks for

Returns:
    OrderedDict of str, Task: list of task names and log records for
        each for the given thread