docstr: Pushes a diagnostic to the inflight diagnostics stack.
  
  Args:
      diagnostic: The diagnostic to push.
  
  Raises:
      ValueError: If the rule is not supported by the tool.
docstr_tok: ["Pushes","a","diagnostic","to","the","inflight","diagnostics","stack",".","Args",":","diagnostic",":","The","diagnostic","to","push",".","Raises",":","ValueError",":","If","the","rule","is","not","supported","by","the","tool","."]
code: def push_inflight_diagnostic(self, diagnostic: _Diagnostic) -> None:
      """Pushes a diagnostic to the inflight diagnostics stack.
  
      Args:
          diagnostic: The diagnostic to push.
  
      Raises:
          ValueError: If the rule is not supported by the tool.
      """
      self._inflight_diagnostics.append(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 10 for calling the DiagnosticContext obj's underlying member method code with example usage: obj.push_inflight_diagnostic(diagnostic) without return types