code: def test_scan_save_mem_basic(n_steps_val):
      """Make sure we can handle storage changes caused by the `scan_save_mem` rewrite."""
  
      def f_pow2(x_tm2, x_tm1):
          return 2 * x_tm1 + x_tm2
  
      init_x = pt.dvector("init_x")
      n_steps = pt.iscalar("n_steps")
      output, _ = scan(
          f_pow2,
          sequences=[],
          outputs_info=[{"initial": init_x, "taps": [-2, -1]}],
          non_sequences=[],
          n_steps=n_steps,
      )
  
      state_val = np.array([1.0, 2.0])
  
      numba_mode = get_mode("NUMBA").including("scan_save_mem")
      py_mode = Mode("py").including("scan_save_mem")
  
      out_fg = FunctionGraph([init_x, n_steps], [output])
      test_input_vals = (state_val, n_steps_val)
  
      compare_numba_and_py(
          out_fg,
          test_input_vals,
          numba_mode=numba_mode,
          py_mode=py_mode,
      )
  
imports: import numpy
  import pytest
  import pytensor
  import pytensor.tensor
  from pytensor import config, function, grad
  from pytensor.compile.mode import Mode, get_mode
  from pytensor.graph.fg import FunctionGraph
  from pytensor.scalar import Log1p
  from pytensor.scan.basic import scan
  from pytensor.scan.op import Scan
  from pytensor.scan.utils import until
  from pytensor.tensor import log, scalar, vector
  from pytensor.tensor.elemwise import Elemwise
  from pytensor.tensor.random.utils import RandomStream
  from tests import unittest_tools
  from tests.link.numba.test_basic import compare_numba_and_py
label_desc: Use image node_id 6 for calling a global function with example usage: test_scan_save_mem_basic(n_steps_val) and returns: unknown