subclass of infra.Diagnostic, and adds additional methods to add
   more information to the diagnostic.
record_cpp_call_stack(frames_to_skip)
  Records the current C++ call stack in the diagnostic.

record_python_call_stack(frames_to_skip)
  Records the current Python call stack in the diagnostic.

class torch.onnx._internal.diagnostics.infra.DiagnosticEngine
A generic diagnostic engine based on SARIF.
This class is the main interface for diagnostics. It manages the
   creation of diagnostic contexts. A DiagnosticContext provides the
   entry point for recording Diagnostics. See infra.DiagnosticContext
   for more details.
-[ Examples ]-
Step 1: Create a set of rules. >>> rules =
   infra.RuleCollection.custom_collection_from_list( ...
   "CustomRuleCollection", ...     [ ...         infra.Rule( ...
   id="r1", ...             name="rule-1", ...
   message_default_template="Mising xxx", ...         ), ...     ],
   ... )