code: def is_built_with_cuda():
      """Returns whether TensorFlow was built with CUDA (GPU) support.
  
      This method should only be used in tests written with `tf.test.TestCase`. A
      typical usage is to skip tests that should only run with CUDA (GPU).
  
      >>> class MyTest(tf.test.TestCase):
      ...
      ...   def test_add_on_gpu(self):
      ...     if not tf.test.is_built_with_cuda():
      ...       self.skipTest("test is only applicable on GPU")
      ...
      ...     with tf.device("GPU:0"):
      ...       self.assertEqual(tf.math.add(1.0, 2.0), 3.0)
  
      TensorFlow official binary is built with CUDA.
      """
      return _test_util.IsGoogleCudaEnabled()
  
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 4 for calling a global function with example usage: is_built_with_cuda() and returns: _test_util