def mark_parent_tasks_as_failed(self, task_name, flush_logs=False):
for existing_task_name in self.tasks:<EOL><INDENT>if existing_task_name == task_name:<EOL><INDENT>break<EOL><DEDENT>if flush_logs:<EOL><INDENT>self.tasks[existing_task_name].clear()<EOL><DEDENT>self.tasks[existing_task_name].failed = True<EOL><DEDENT>self.mark_main_tasks_as_failed()<EOL>
Marks all the parent tasks as failed

Args:
    task_name (str): Name of the child task
    flush_logs (bool): If ``True`` will discard all the logs form
        parent tasks

Returns:
    None