docstr: Returns a SARIF reporting descriptor of this Rule.
docstr_tok: ["Returns","a","SARIF","reporting","descriptor","of","this","Rule","."]
code: def sarif(self) -> sarif.ReportingDescriptor:
      """Returns a SARIF reporting descriptor of this Rule."""
      short_description = (
          sarif.MultiformatMessageString(text=self.short_description)
          if self.short_description is not None
          else None
      )
      full_description = (
          sarif.MultiformatMessageString(
              text=self.full_description,
              markdown=self.full_description_markdown,
          )
          if self.full_description is not None
          else None
      )
      return sarif.ReportingDescriptor(
          id=self.id,
          name=self.name,
          short_description=short_description,
          full_description=full_description,
          help_uri=self.help_uri,
      )
  
imports: from __future__ import annotations
  import dataclasses
  import enum
  import logging
  from typing import FrozenSet, List, Mapping, Optional, Sequence, Tuple
  from torch.onnx._internal.diagnostics.infra import formatter, sarif
label_desc: Use image node_id 2 for calling the Rule obj's underlying member method code with example usage: obj.sarif() and returns: sarif