code: def task_failure_message(task_report):
      
      trace_list = traceback.format_tb(task_report['traceback'])
      body = 'Error: task failure\n\n'
      body += 'Task ID: {}\n\n'.format(task_report['task_id'])
      body += 'Archive: {}\n\n'.format(task_report['archive'])
      body += 'Docker image: {}\n\n'.format(task_report['image'])
      body += 'Exception: {}\n\n'.format(task_report['exception'])
      body += 'Traceback:\n {} {}'.format(
          string.join(trace_list[:-1], ''), trace_list[-1])
      return body
docs: Task failure message.