code: def testLoopGPU(self):
      if not test.is_gpu_available():
          return
  
      ops.reset_default_graph()
      with ops.device("/device:GPU:0"):
          _, run_meta = _run_loop_model()
          # The while-loop caused a node to appear 4 times in scheduling.
          ret = _extract_node(
              run_meta, "rnn/while/basic_rnn_cell/MatMul"
          )
          self.assertEqual(len(ret["gpu:0"]), 4, "%s" % run_meta)
  
          total_cpu_execs = 0
          for node in ret["gpu:0"]:
              total_cpu_execs += node.op_end_rel_micros
  
              self.assertGreaterEqual(
                  len(ret["gpu:0/stream:all"]), 4, "%s" % run_meta
              )
  
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 6 for calling the RunMetadataTest obj's underlying member method code with example usage: obj.testLoopGPU() without return types