code: def create_message(self):
          
  
          body = dedent("""\
          Received exception {exception} on {queue} from worker {worker}:
  
          {traceback}
  
          Payload:
          {payload}
  
          """).format(exception=self._exception,
                     traceback=self._traceback,
                     queue=self._queue,
                     payload=self._payload,
                     worker=self._worker)
  
          return MIMEText(body)
docs: Returns a message body to send in this email. Should be from email.mime.*