code: def stop(self):
          
          et = ET.ElementTree(self.checkstyle_element)
          f = BytesIO()
          et.write(f, encoding='utf-8', xml_declaration=True)
          xml = f.getvalue().decode('utf-8')
          if self.output_fd is None:
              print(xml)
          else:
              self.output_fd.write(xml)
          super(CheckstylePlugin, self).stop()
docs: Output Checkstyle XML reports.