code: def _skip_if(cond, reason):
      """Skip test if cond(self) is True"""
  
      def decorator(impl):
          @functools.wraps(impl)
          def wrapper(self, *args, **kwargs):
              if cond(self):
                  raise unittest.SkipTest(reason)
              else:
                  impl(self, *args, **kwargs)
  
          return wrapper
  
      return decorator
  
imports: import functools
  import itertools
  import unittest
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 1 for calling a global function with example usage: _skip_if(cond, reason) and returns: decorator, wrapper