code: def skip_torchlib_forward_compatibility(
      op_name: str,
      variant_name: str = "",
      *,
      reason: str,
      github_issue: str,
      opsets: Optional[
          Collection[Union[int, Callable[[int], bool]]]
      ] = None,
      dtypes: Optional[Collection[torch.dtype]] = None,
      matcher: Optional[Callable[[Any], Any]] = None,
      enabled_if: bool = True,
  ):
      """Prefer using xfail_torchlib_forward_compatibility over this (skip) when possible.
  
      Only skip when the test is not failing consistently.
      """
      return skip(
          op_name,
          variant_name=variant_name,
          reason=f"{reason}. GitHub Issue: {github_issue}",
          opsets=opsets,
          dtypes=dtypes,
          matcher=matcher,
          enabled_if=enabled_if,
      )
  
imports: from __future__ import annotations
  import copy
  import itertools
  from typing import Any, Callable, Collection, Mapping, Optional, Tuple, Type, Union
  import onnx_test_common
  import parameterized
  import pytest
  import pytorch_test_common
  import torch
  from onnx_test_common import skip, skip_slow, xfail
  from torch.onnx._internal.diagnostics import _rules
  from torch.testing._internal import common_device_type, common_methods_invocations, common_utils
  from torch.testing._internal.opinfo import core
label_desc: Use image node_id 2 for calling a global function with example usage: skip_torchlib_forward_compatibility(op_name, variant_name) and returns: skip