code: def disable_with_predicate(pred, skip_message):
      """Disables the test if pred is true."""
  
      def decorator_disable_with_predicate(func):
          @functools.wraps(func)
          def wrapper_disable_with_predicate(self, *args, **kwargs):
              if pred():
                  self.skipTest(skip_message)
              else:
                  return func(self, *args, **kwargs)
  
          return wrapper_disable_with_predicate
  
      return decorator_disable_with_predicate
  
file_path: tensorflow-upstream/tensorflow/python/platform/test.py
imports: import functools
  from unittest import mock
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import googletest
  from tensorflow.python.framework.test_util import assert_equal_graph_def
  from tensorflow.python.framework.test_util import create_local_cluster
  from tensorflow.python.framework.test_util import TensorFlowTestCase
  from tensorflow.python.framework.test_util import gpu_device_name
  from tensorflow.python.framework.test_util import is_gpu_available
  from tensorflow.python.ops.gradient_checker import compute_gradient_error
  from tensorflow.python.ops.gradient_checker import compute_gradient
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 6 for calling a global function with example usage: disable_with_predicate(pred, skip_message) and returns: decorator_disable_with_predicate, wrapper_disable_with_predicate, func