<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write_warning (self, url_data):
 """Write url_data.warnings."""

        sep = u"<br/>"+os.linesep
        text = sep.join(cgi.escape(x[1]) for x in url_data.warnings)
        self.writeln(u'<tr><td class="warning" '+
                     u'valign="top">' + self.part("warning") +
                     u'</td><td class="warning">' + text + u"</td></tr>")