docstr: Count how many XlaCompile/XlaRun labels are present.
docstr_tok: ["Count","how","many","XlaCompile\/XlaRun","labels","are","present","."]
code: def countXlaOps(self, labels):
      """Count how many XlaCompile/XlaRun labels are present."""
      xla_compile_count = sum("XlaCompile(" in x for x in labels)
      xla_run_count = sum("XlaRun(" in x for x in labels)
      self.assertEqual(xla_compile_count, xla_run_count)
      return xla_run_count
  
file_path: tensorflow/tensorflow/compiler/tests/dense_layer_test.py
imports: import os
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.compiler.xla import jit
  from tensorflow.python.framework import ops
  from tensorflow.python.layers import layers
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the DenseLayerTest obj's underlying member method code with example usage: obj.countXlaOps(labels) and returns: xla_run_count