code: def test_scan_mitsot_with_nonseq():
      a_pt = scalar("a")
  
      def input_step_fn(y_tm1, y_tm3, a):
          y_tm1.name = "y_tm1"
          y_tm3.name = "y_tm3"
          res = (y_tm1 + y_tm3) * a
          res.name = "y_t"
          return res
  
      y_scan_pt, _ = scan(
          fn=input_step_fn,
          outputs_info=[
              {
                  "initial": pt.as_tensor_variable(
                      np.r_[-1.0, 1.3, 0.0].astype(config.floatX)
                  ),
                  "taps": [-1, -3],
              },
          ],
          non_sequences=[a_pt],
          n_steps=10,
          name="y_scan",
      )
      y_scan_pt.name = "y"
      y_scan_pt.owner.inputs[0].name = "y_all"
  
      out_fg = FunctionGraph([a_pt], [y_scan_pt])
  
      test_input_vals = [np.array(10.0).astype(config.floatX)]
      compare_jax_and_py(out_fg, test_input_vals)
  
imports: import re
  import numpy
  import pytest
  import pytensor.tensor
  from pytensor import function, shared
  from pytensor.compile import get_mode
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.scan import until
  from pytensor.scan.basic import scan
  from pytensor.scan.op import Scan
  from pytensor.tensor import random
  from pytensor.tensor.math import gammaln, log
  from pytensor.tensor.type import dmatrix, dvector, lscalar, matrix, scalar, vector
  from tests.link.jax.test_basic import compare_jax_and_py
label_desc: Use image node_id 10 for calling a global function with example usage: test_scan_mitsot_with_nonseq() and returns: res