code: def op_test(devices):
      """Decorator to set up an op test.
  
      This decorator can be used in conjunction with either ``NumpyOpTest`` or
      ``ChainerOpTest`` to define an op test.
  
      See the documentation of the respective classes for detailed explanation
      and examples.
  
      Args:
          devices: List of devices to test.
      """
  
      def wrap(cls):
          # TODO(niboshi): Avoid using private entries in chainer.testing.
          if isinstance(
              cls, chainer.testing._bundle._ParameterizedTestCaseBundle
          ):
              classes = []
              for c, m, name in cls.cases:
                  classes.append((c, m))
                  if m is not None:
                      # The input is a parameterized test case.
                      # Remove it from its module.
                      delattr(sys.modules[m], name)
          else:
              classes = [(cls, cls.__module__)]
  
          for cls, mod in classes:
              if not issubclass(cls, OpTest):
                  raise TypeError(
                      "@op_test decorator can only be applied to OpTest class "
                      "definition."
                  )
              _create_test_entry_function(
                  cls, sys.modules[mod], devices
              )
  
          # return None: no other decorator can be applied after this decorator.
          return None
  
      return wrap
  
imports: import inspect
  import sys
  import unittest
  import numpy
  import pytest
  import chainer
  import chainer.testing
  import chainerx
label_desc: Use image node_id 3 for calling a global function with example usage: op_test(devices) and returns: wrap, None