code: def _test_loop_fn(self, loop_fn, iters, force_xla=False):
      def f():
          return pfor_control_flow_ops.pfor(loop_fn, iters)
  
      @def_function.function
      def jit_f():
          with jit.experimental_jit_scope():
              return f()
  
      out = f()
      jit_out = jit_f()
      self.run_and_assert_equal(out, jit_out)
      # TODO(agarwal): The following may complain about uncompilable nodes. Hence
      # these are currently not enabled for all tests.
      if force_xla:
          out_exp_compile_f = def_function.function(jit_compile=True)(
              f
          )()
          self.run_and_assert_equal(out, out_exp_compile_f)
          out_xla_compile_f = xla.compile(f, inputs=[])
          self.run_and_assert_equal(out, out_xla_compile_f)
  
imports: from tensorflow.compiler.tf2xla.python import xla
  from tensorflow.python.compiler.xla import jit
  from tensorflow.python.compiler.xla import xla
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_v2_toggles
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.ops.parallel_for import control_flow_ops
  from tensorflow.python.ops.parallel_for.test_util import PForTestCase
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the WhileV2Test obj's underlying member method code with example usage: obj._test_loop_fn(loop_fn, iters, force_xla) and returns: pfor_control_flow_ops, f