code: def skipIfUnsupportedMinOpsetVersion(
      min_opset_version, current_opset_version=None
  ):
      """
      Skips tests for ONNX Opset versions older than min_opset_version.
      """
  
      def skip_dec(func):
          def wrapper(self):
              try:
                  opset_version = self.opset_version
              except AttributeError:
                  opset_version = current_opset_version
              if opset_version < min_opset_version:
                  raise unittest.SkipTest(
                      f"Unsupported opset_version {opset_version}"
                      f", required is {min_opset_version}"
                  )
              return func(self)
  
          return wrapper
  
      return skip_dec
  
imports: import io
  import numpy
  import os
  import re
  import tempfile
  import unittest
  from typing import Callable
  import torch
  import torch.onnx.symbolic_helper
  from packaging import version
  from torch._C import ListType
  from torch.onnx import register_custom_op_symbolic
  from detectron2 import model_zoo
  from detectron2.config import CfgNode, LazyConfig, instantiate
  from detectron2.data import DatasetCatalog
  from detectron2.data.detection_utils import read_image
  from detectron2.modeling import build_model
  from detectron2.structures import Boxes, Instances, ROIMasks
  from detectron2.utils.file_io import PathManager
label_desc: Use image node_id 12 for calling a global function with example usage: skipIfUnsupportedMinOpsetVersion(min_opset_version, current_opset_version) and returns: skip_dec, wrapper, func