code: def test_tf_control_flow_in_py_while(self, n, target):
      with self.assertRaisesRegex(
          NotImplementedError,
          re.compile(
              r".*condition of while loop started as non\-Tensor,"
              r" then changed to Tensor.*",
              re.DOTALL,
          ),
      ):
          tf.function(target)(n)
  
file_path: tensorflow-upstream/tensorflow/python/autograph/tests/loop_control_flow_illegal_cases_test.py
imports: import itertools
  import re
  from absl.testing import parameterized
  import tensorflow
  from tensorflow.python.autograph.tests import reference_test_base
label_desc: Use image node_id 2 for calling the LoopControlFlowIllegalCasesTest obj's underlying member method code with example usage: obj.test_tf_control_flow_in_py_while(n, target) without return types