code: def test_scan_over_seqs():
      """Test that logprob inference for scans based on sequences (mapping)."""
      rng = np.random.default_rng(543)
      n_steps = 10
  
      xs = pt.random.normal(size=(n_steps,), name="xs")
      ys, _ = pytensor.scan(
          fn=lambda x: pt.random.normal(x),
          sequences=[xs],
          outputs_info=[None],
          name="ys",
      )
  
      xs_vv = ys.clone()
      ys_vv = ys.clone()
      ys_logp = conditional_logp({xs: xs_vv, ys: ys_vv})[ys_vv]
  
      assert_no_rvs(ys_logp)
  
      xs_test = rng.normal(size=(10,))
      ys_test = rng.normal(size=(10,))
      np.testing.assert_array_almost_equal(
          ys_logp.eval({xs_vv: xs_test, ys_vv: ys_test}),
          stats.norm.logpdf(ys_test, xs_test),
      )
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor import Mode
  from pytensor.raise_op import assert_op
  from pytensor.scan.utils import ScanArgs
  from scipy import stats
  from pymc.logprob.abstract import _logprob_helper
  from pymc.logprob.basic import conditional_logp, logp
  from pymc.logprob.scan import construct_scan, convert_outer_out_to_in, get_random_outer_outputs
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 8 for calling a global function with example usage: test_scan_over_seqs() without return types