code: def _make_decorator(check_result_func, name, accept_error):
      def decorator(impl):
          @functools.wraps(impl)
          def test_func(*args, **kw):
              kw[name] = chainerx
              chainerx_result, chainerx_error, chainerx_tb = _call_func(
                  impl, args, kw
              )
  
              kw[name] = numpy
              with warnings.catch_warnings():
                  warnings.simplefilter("ignore", RuntimeWarning)
                  numpy_result, numpy_error, numpy_tb = _call_func(
                      impl, args, kw
                  )
  
              if chainerx_error or numpy_error:
                  _check_chainerx_numpy_error(
                      chainerx_error,
                      chainerx_tb,
                      numpy_error,
                      numpy_tb,
                      accept_error=accept_error,
                  )
                  return
              assert (
                  chainerx_result is not None
                  and numpy_result is not None
              ), (
                  "Either or both of ChainerX and numpy returned None. "
                  "chainerx: {}, numpy: {}".format(
                      chainerx_result, numpy_result
                  )
              )
              _check_chainerx_numpy_result(
                  check_result_func, chainerx_result, numpy_result
              )
  
          # Apply dummy parametrization on `name` (e.g. 'xp') to avoid pytest
          # error when collecting test functions.
          return pytest.mark.parametrize(name, [None])(test_func)
  
      return decorator
  
imports: import functools
  import traceback
  import warnings
  import numpy
  import pytest
  import chainerx
  from chainerx.testing import array
label_desc: Use image node_id 8 for calling a global function with example usage: _make_decorator(check_result_func, name, accept_error) and returns: decorator, pytest