<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parsewarn(self, msg, line=None):
 """Emit parse warning."""

        if line is None:
            line = self.sline
        self.dowarn('warning: ' + msg + ' on line {}'.format(line))