code: def test_simulator_in_loop():
      # https://github.com/google-research/kubric/issues/208
      # https://github.com/google-research/kubric/issues/234
      for _ in range(10):
          scene = kb.Scene(
              gravity=(
                  0,
                  -10,
                  0,
              ),  # A planet slightly larger than Earth.
              frame_end=24,  # One second.
          )
          simulator = KubricSimulator(scene)
          cube = kb.Cube(
              name="box",
              position=[0, 0, 0],
          )
          scene.add(cube)
          simulator.run()
          np.testing.assert_allclose(
              cube.position[1], -0.5 * 10, atol=0.1
          )
  
imports: import kubric
  from kubric.simulator.pybullet import PyBullet
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: test_simulator_in_loop() without return types