<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_output (self, **kwargs):
 """Write end of checking info as HTML."""

        if self.has_part("stats"):
            self.write_stats()
        if self.has_part("outro"):
            self.write_outro()
        self.close_fileoutput()