code: protected void printDiagnostic(PrintWriter pw, TapElement tapElement) {
          if (this.yaml != null) {
              Map<String, Object> diagnostic = tapElement.getDiagnostic();
              if (diagnostic != null && !diagnostic.isEmpty()) {
                  String diagnosticText = yaml.dump(diagnostic);
                  diagnosticText = diagnosticText.replaceAll("((?m)^)", "  ");
                  pw.append(LINE_SEPARATOR);
                  printFiller(pw);
                  pw.append(diagnosticText);
              }
          }
      }
docs: Prints diagnostic of the TAP Element into the Print Writer.
  
  @param pw Print Writer
  @param tapElement TAP element