code: def test_input_not_aliased_to_update(mode):
      n_steps = int64("n_steps")
      x0 = float64("x0")
      y0 = float64("y0")
      const = float64("const")
  
      def update(x_prev, y_prev):
          x = x_prev + const
          # y depends on x_prev, so x_prev should not be overriden by x!
          y = y_prev + x_prev
          return [x, y]
  
      op = ScalarLoop(
          init=[x0, y0], constant=[const], update=update(x0, y0)
      )
      x, y = op(n_steps, x0, y0, const)
  
      fn = function([n_steps, x0, y0, const], y, mode=mode)
      np.testing.assert_allclose(
          fn(n_steps=1, x0=0, y0=0, const=1), 0.0
      )
      np.testing.assert_allclose(
          fn(n_steps=2, x0=0, y0=0, const=1), 1.0
      )
      np.testing.assert_allclose(
          fn(n_steps=3, x0=0, y0=0, const=1), 3.0
      )
      np.testing.assert_allclose(
          fn(n_steps=4, x0=0, y0=0, const=1), 6.0
      )
      np.testing.assert_allclose(
          fn(n_steps=5, x0=0, y0=0, const=1), 10.0
      )
  
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 3 for calling a global function with example usage: test_input_not_aliased_to_update(mode) and returns: list