code: def test_python_generator_with_extra_test_no_iterations(self):
      def new_generator():
          for i in range(5):
              yield i
  
      gen = new_generator()
  
      def run_loop():
          s = 0
  
          def body(i):
              nonlocal s
              s = s * 10 + i
  
          control_flow.for_stmt(
              gen,
              extra_test=lambda: False,  # Break before loop
              body=body,
              get_state=None,
              set_state=None,
              symbol_names=("s",),
              opts={},
          )
          return s
  
      self.assertEqual(run_loop(), 0)
      self.assertEqual(run_loop(), 0)
  
      self.assertEqual(next(gen), 0)
  
file_path: DALI/dali/test/python/autograph/operators/test_control_flow.py
imports: import unittest
  from nvidia.dali._autograph.operators import control_flow
label_desc: Use image node_id 3 for calling the ForLoopTest obj's underlying member method code with example usage: obj.test_python_generator_with_extra_test_no_iterations() and returns: s