code: def test_iterator_loop_with_return_raises(self):
      # This is for the same reason why returns in loops aren't allowed.
      # TODO(mdan): This might be resolved by unrolling the loop once.
      with self.assertRaisesRegex(
          NotImplementedError,
          "a return statement cannot be placed inside this TensorFlow loop",
      ):
          tf.function(iterator_loop_with_return)(self.ds)
  
imports: import tensorflow
  from tensorflow.python.autograph.tests import reference_test_base
label_desc: Use image node_id 11 for calling the ReferenceTest obj's underlying member method code with example usage: obj.test_iterator_loop_with_return_raises() without return types