code: def get_content_type(self):
          
          missing = object()
          value = self.get('content-type', missing)
          if value is missing:
              # This should have no parameters
              return self.get_default_type()
          ctype = _splitparam(value)[0].lower()
          # RFC 2045, section 5.2 says if its invalid, use text/plain
          if ctype.count('/') != 1:
              return 'text/plain'
          return ctype
docs: Return the message's content type.
  
          The returned string is coerced to lower case of the form
          `maintype/subtype'.  If there was no Content-Type header in the
          message, the default type as given by get_default_type() will be
          returned.  Since according to RFC 2045, messages always have a default
          type this will always return a value.
  
          RFC 2045 defines a message's default type to be text/plain unless it
          appears inside a multipart/digest container, in which case it would be
          message/rfc822.