code: def test_inner_loop(mode):
      n_steps = int64("n_steps")
      x = float64("x")
  
      x_in = float64("x_in")
      inner_loop_op = ScalarLoop(init=[x_in], update=[x_in + 1])
  
      outer_loop_op = ScalarLoop(
          init=[x],
          update=[inner_loop_op(n_steps, x)],
          constant=[n_steps],
      )
      y = outer_loop_op(n_steps, x, n_steps)
  
      fn = function([n_steps, x], y, mode=mode)
      np.testing.assert_allclose(fn(n_steps=5, x=0), 5**2)
      np.testing.assert_allclose(fn(n_steps=7, x=0), 7**2)
      np.testing.assert_allclose(fn(n_steps=7, x=1), 7**2 + 1)
  
      # Now with a dtype that must be rebuilt
      x16 = float16("x16")
      y16 = outer_loop_op(n_steps, x16, n_steps)
      assert y16.type.dtype == "float16"
  
      fn32 = function([n_steps, x16], y16, mode=mode)
      np.testing.assert_allclose(
          fn32(n_steps=3, x16=np.array(2.5, dtype="float16")),
          3**2 + 2.5,
      )
  
imports: import re
  import numpy
  import pytest
  from pytensor import Mode, function
  from pytensor.scalar import Composite, as_scalar, cos, exp, float16, float32, float64, identity, int64, sin
  from pytensor.scalar.loop import ScalarLoop
  from pytensor.tensor import exp
label_desc: Use image node_id 13 for calling a global function with example usage: test_inner_loop(mode) without return types