<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def end_element (self, tag):
 """ Print HTML end element. @param tag: tag name @type tag: string @return: None """

        tag = tag.encode(self.encoding, "ignore")
        self.fd.write("</%s>" % tag)