code: def testCompilationGradientScopeNames(self):
      with self.session(graph=ops.Graph()):
          with jit.experimental_jit_scope():
              # XlaScope 0
              a1 = constant_op.constant([[1.0]])
              a1t = math_ops.matmul(a1, a1)
          with jit.experimental_jit_scope():
              # XlaScope 1
              a2 = constant_op.constant([[1.0]])
              a2t = math_ops.matmul(a2, a2)
  
          self.assertEqual(b"jit_scope_0", a1.op.get_attr("_XlaScope"))
          self.assertEqual(b"jit_scope_1", a2.op.get_attr("_XlaScope"))
          grad_a1 = gradients.gradients(a1t, a1, name="GA")[0]
          grad_a2 = gradients.gradients(a2t, a2, name="GB")[0]
          grad_a1 = grad_a1.op.inputs[0]
          grad_a2 = grad_a2.op.inputs[0]
          self.assertTrue(grad_a1.op.get_attr("_XlaCompile"))
          self.assertTrue(grad_a2.op.get_attr("_XlaCompile"))
          self.assertEqual(
              b"jit_scope_0", grad_a1.op.get_attr("_XlaScope")
          )
          self.assertEqual(
              b"jit_scope_1", grad_a2.op.get_attr("_XlaScope")
          )
  
imports: from absl.testing import parameterized
  from tensorflow.python.compiler.xla import jit
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import function
  from tensorflow.python.framework import op_def_registry
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import random_seed
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import gradients
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the CompilationEnabledInGradientTest obj's underlying member method code with example usage: obj.testCompilationGradientScopeNames() without return types