class_docstr: Runtime error with enclosed diagnostic information.
code: def __init__(self, diagnostic: Diagnostic):
      super().__init__(diagnostic.message)
      self.diagnostic = diagnostic
  
imports: from __future__ import annotations
  import contextlib
  import dataclasses
  import gzip
  import logging
  from typing import Callable, Generator, Generic, List, Literal, Mapping, Optional, Type, TypeVar
  from torch.onnx._internal.diagnostics import infra
  from torch.onnx._internal.diagnostics.infra import formatter, sarif, utils
  from torch.onnx._internal.diagnostics.infra.sarif import version
label_desc: Use image node_id 1 to create a new RuntimeErrorWithDiagnostic object from inherited base classes: RuntimeError with example: obj = RuntimeErrorWithDiagnostic(diagnostic)