code: def test_inner_composite(mode):
      n_steps = int64("n_steps")
      x = float64("x")
  
      one = Composite([x], [cos(exp(x)) ** 2 + sin(exp(x)) ** 2])(x)
  
      op = ScalarLoop(init=[x], update=[one + x])
      y = op(n_steps, x)
  
      fn = function([n_steps, x], y, mode=mode)
      np.testing.assert_allclose(fn(n_steps=5, x=2.53), 2.53 + 5)
  
      # Now with a dtype that must be rebuilt
      x16 = float16("x16")
      y16 = op(n_steps, x16)
      assert y16.type.dtype == "float16"
  
      fn32 = function([n_steps, x16], y16, mode=mode)
      np.testing.assert_allclose(
          fn32(n_steps=9, x16=np.array(4.73, dtype="float16")),
          4.73 + 9,
          rtol=1e-3,
      )
  
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 12 for calling a global function with example usage: test_inner_composite(mode) without return types