code: def to_text(self):
          
          message = ''
          last_was_text = False
          for m in self.message:
              if last_was_text and not isinstance(m, Text):
                  message += '\n'
  
              message += m.to_text()
  
              if isinstance(m, Text):
                  last_was_text = True
              else:
                  message += '\n'
                  last_was_text = False
          return message
docs: Render a MessageElement queue as plain text.
  
          :returns: Plain text representation of the message.
          :rtype: str