docstr: Tests that external control edges are handled correctly.
code: def test_external_control_edges_graph_mode(self):
      """Tests that external control edges are handled correctly."""
      i = constant_op.constant(1)
      op1 = constant_op.constant(1)
  
      with ops.control_dependencies([op1]):
          op2 = constant_op.constant(1)
      self.assertIn(op1.op, op2.op.control_inputs)
  
      def while_body(i):
          del i  # unused
          context = self.create_test_xla_compile_context()
          context.Enter()
          with ops.control_dependencies([op1]):
              op3 = constant_op.constant(1)
          context.Exit()
          self.assertNotIn(op1.op, op3.op.control_inputs)
          return op3
  
      while_loop.while_loop(
          cond=lambda i: math_ops.less(i, 10),
          body=while_body,
          loop_vars=[i],
      )
  
imports: from absl.testing import parameterized
  from tensorflow.python import summary
  from tensorflow.python.compiler.xla import xla
  from tensorflow.python.eager import def_function
  from tensorflow.python.estimator import model_fn
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import logging_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import state_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
  from tensorflow.python.tpu import tpu_feed
label_desc: Use image node_id 9 for calling the XLACompileContextTest obj's underlying member method code with example usage: obj.test_external_control_edges_graph_mode() and returns: op3