class_docstr: Generates a text representation of a message.
  
  Like the Generator base class, except that non-text parts are substituted
  with a format string representing the part.
code: def _dispatch(self, msg):
      for part in msg.walk():
          maintype = part.get_content_maintype()
          if maintype == "text":
              print(part.get_payload(decode=False), file=self)
          elif maintype == "multipart":
              # Just skip this
              pass
          else:
              print(
                  self._fmt
                  % {
                      "type": part.get_content_type(),
                      "maintype": part.get_content_maintype(),
                      "subtype": part.get_content_subtype(),
                      "filename": part.get_filename("[no filename]"),
                      "description": part.get(
                          "Content-Description", "[no description]"
                      ),
                      "encoding": part.get(
                          "Content-Transfer-Encoding", "[no encoding]"
                      ),
                  },
                  file=self,
              )
  
imports: import re
  import sys
  import time
  import random
  from copy import deepcopy
  from io import StringIO, BytesIO
  from email.utils import _has_surrogates
label_desc: Use image node_id 2 for calling the DecodedGenerator obj's underlying member method code with example usage: obj._dispatch(msg) without return types