docs: def escape_header(val):
      """Escapes a value so that it can be used in a mime header"""
  
      if val is None:
          return None
      try:
          return quote(val, encoding="ascii", safe="/ ")
      except ValueError:
          return "utf-8''" + quote(val, encoding="utf-8", safe="/ ")