<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def helpdefault(self, cmd, known):
 """Hook called to handle help on a command for which there is no help handler. "cmd" is the command name on which help was requested. "known" is a boolean indicating if this command is known (i.e. if there is a handler for it). Returns a return code. """

        if known:
            msg = self._str(self.nohelp % (cmd, ))
            if self.cmdlooping:
                self.stderr.write(msg + '\n')
            else:
                self.stderr.write("%s: %s\n" % (self.name, msg))
        else:
            msg = self.unknowncmd % (cmd, )
            if self.cmdlooping:
                self.stderr.write(msg + '\n')
            else:
                self.stderr.write("%s: %s\n"
                                  "Try '%s help' for info.\n" %
                                  (self.name, msg, self.name))
        self.stderr.flush()
        return 1