class_docstr: Information about a test case to skip or xfail.
  
  Adapted from functorch: functorch/test/common_utils.py
  
  Attributes:
      op_name: The name of the operator.
      variant_name: The name of the OpInfo variant.
      decorator: The decorator to apply to the test case.
      opsets: The opsets to apply the decorator to.
      dtypes: The dtypes to apply the decorator to.
      reason: The reason for skipping.
      test_behavior: The behavior of the test case. [skip or xfail]
      matcher: The matcher to apply to the test case.
      enabled_if: Whether to enable test behavior. Usually used on onnx/ort version control
      model_type: The type of the torch model. Defaults to None.
class_docstr_tok: ["Information","about","a","test","case","to","skip","or","xfail",".","Adapted","from","functorch",":","functorch\/test\/common_utils.py","Attributes",":","op_name",":","The","name","of","the","operator",".","variant_name",":","The","name","of","the","OpInfo","variant",".","decorator",":","The","decorator","to","apply","to","the","test","case",".","opsets",":","The","opsets","to","apply","the","decorator","to",".","dtypes",":","The","dtypes","to","apply","the","decorator","to",".","reason",":","The","reason","for","skipping",".","test_behavior",":","The","behavior","of","the","test","case",".","[","skip","or","xfail","]","matcher",":","The","matcher","to","apply","to","the","test","case",".","enabled_if",":","Whether","to","enable","test","behavior",".","Usually","used","on","onnx\/ort","version","control","model_type",":","The","type","of","the","torch","model",".","Defaults","to","None","."]
code: def contains_opset(self, opset: int) -> bool:
      if self.opsets is None:
          return True
      return any(
          opset == opset_spec
          if isinstance(opset_spec, int)
          else opset_spec(opset)
          for opset_spec in self.opsets
      )
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import dataclasses
  import io
  import logging
  import os
  import unittest
  import warnings
  from typing import Any, Callable, Collection, Iterable, List, Mapping, Optional, Sequence, Tuple, Type, Union
  import numpy
  import onnxruntime
  import pytest
  import pytorch_test_common
  import torch
  from torch import export
  from torch.onnx import _constants, verification
  from torch.onnx._internal import _beartype
  from torch.onnx._internal.fx import diagnostics
  from torch.testing._internal import common_utils
  from torch.testing._internal.opinfo import core
  from torch.types import Number
label_desc: Use image node_id 1 for calling the DecorateMeta obj's underlying member method code with example usage: obj.contains_opset(opset) and returns: any, True