function createDiagnosticCollector(): DiagnosticCollector
Create a new instance of the
DiagnosticCollector
DiagnosticCollector.