code: def testGPU(self):
      if not test.is_gpu_available(cuda_only=True):
          return
  
      gpu_dev = test.gpu_device_name()
      ops.reset_default_graph()
      with ops.device(gpu_dev):
          tfprof_node, run_meta = _run_model()
          self.assertEqual(tfprof_node.children[0].name, "MatMul")
          self.assertGreater(tfprof_node.children[0].exec_micros, 10)
  
      ret = _extract_node(run_meta, "MatMul")
      self.assertEqual(len(ret["gpu:0"]), 1)
  
imports: from collections import defaultdict
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
  from tensorflow.python.profiler import option_builder
  from tensorflow.python.profiler import model_analyzer
  from tensorflow.python.profiler.internal import model_analyzer_testlib
label_desc: Use image node_id 1 for calling the RunMetadataTest obj's underlying member method code with example usage: obj.testGPU() without return types