def stop(self) -> None:
    'Clean up after reporting is finished.'
    if (self.output_fd is not None):
        self.output_fd.close()
        self.output_fd = None
Clean up after reporting is finished.
def stop(self) -> None:
    
    if (self.output_fd is not None):
        self.output_fd.close()
        self.output_fd = None