docs: def analyze(self, output_file=None):
          """
          Analyzes the parsed results from Flake8 or PEP 8 output and creates FileResult instances
          :param output_file: If specified, output will be written to this file instead of stdout.
          """
  
          fr = None
          for path, code, line, char, desc in self.parser.parse():
  
              # Create a new FileResult and register it if we have changed to a new file
              if path not in self.files:
                  # Update statistics
                  if fr:
                      self.update_stats(fr)
                  fr = FileResult(path)
                  self.files[path] = fr
  
              # Add line to the FileResult
              fr.add_error(code, line, char, desc)
  
          # Add final FileResult to statistics, if any were parsed
          if fr:
              self.update_stats(fr)
  
          # Generate HTML file
          self.generate(output_file=output_file)