code: def parse(cls: Type[MessageT], uid: int, data: bytes,
                permanent_flags: Iterable[Flag], internal_date: datetime,
                expunged: bool = False, **kwargs: Any) -> MessageT:
          
          content = MessageContent.parse(data)
          return cls(uid, permanent_flags, internal_date, expunged,
                     content, **kwargs)
docs: Parse the given file object containing a MIME-encoded email message
          into a :class:`BaseLoadedMessage` object.
  
          Args:
              uid: The UID of the message.
              data: The raw contents of the message.
              permanent_flags: Permanent flags for the message.
              internal_date: The internal date of the message.
              expunged: True if this message has been expunged from the mailbox.