code: def add_decorate_info(
      all_opinfos: Sequence[opinfo_core.OpInfo],
      test_class_name: str,
      base_test_name: str,
      opset: int,
      skip_or_xfails: Iterable[DecorateMeta],
  ):
      """Decorates OpInfo tests with decorators based on the skip_or_xfails list.
  
      Args:
          all_opinfos: All OpInfos.
          test_class_name: The name of the test class.
          base_test_name: The name of the test method.
          opset: The opset to decorate for.
          skip_or_xfails: DecorateMeta's.
      """
      ops_mapping = {
          (info.name, info.variant_test_name): info
          for info in all_opinfos
      }
      for decorate_meta in skip_or_xfails:
          if not decorate_meta.contains_opset(opset):
              # Skip does not apply to this opset
              continue
          opinfo = ops_mapping.get(
              (decorate_meta.op_name, decorate_meta.variant_name)
          )
          assert (
              opinfo is not None
          ), f"Couldn't find OpInfo for {decorate_meta}. Did you need to specify variant_name?"
          decorators = list(opinfo.decorators)
          new_decorator = opinfo_core.DecorateInfo(
              decorate_meta.decorator,
              test_class_name,
              base_test_name,
              dtypes=decorate_meta.dtypes,
              active_if=decorate_meta.enabled_if,
          )
          decorators.append(new_decorator)
          opinfo.decorators = tuple(decorators)
  
      # This decorator doesn't modify fn in any way
      def wrapped(fn):
          return fn
  
      return wrapped
  
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 11 for calling a global function with example usage: add_decorate_info(all_opinfos, test_class_name, base_test_name, opset, skip_or_xfails) and returns: wrapped, fn