<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_text(self):
 """Render a Heading MessageElement as plain text :returns: The plain text representation of the Heading MessageElement. """

        if self.text is None:
            return

        level = '*' * self.level
        return '%s%s\n' % (level, self.text)