class_docstr: Generates output from a Message object tree.
  
  This basic generator writes the message to the given file object as plain
  text.
code: def _write_headers(self, msg):
      for h, v in msg.raw_items():
          self.write(self.policy.fold(h, v))
      # A blank line always separates headers from body
      self.write(self._NL)
  
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 10 for calling the Generator obj's underlying member method code with example usage: obj._write_headers(msg) without return types