<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def print_message(self, message="heya!"):
 """ If self.log is defined to be an instance of TextLog, it print the message there. Otherwise use the usual "print" to command line. """

        if self.log == None: print(message)
        else:                self.log.append_text(message)