code: def test_scan_non_pure_rv_output():
      grw, _ = pytensor.scan(
          fn=lambda xtm1: pt.random.normal() + xtm1,
          outputs_info=[pt.zeros(())],
          n_steps=10,
          name="grw",
      )
  
      grw_vv = grw.clone()
      grw_logp = logp(grw, grw_vv)
      assert_no_rvs(grw_logp)
  
      grw_vv_test = np.arange(10) + 1
      np.testing.assert_array_almost_equal(
          grw_logp.eval({grw_vv: grw_vv_test}),
          stats.norm.logpdf(np.ones(10)),
      )
  
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 7 for calling a global function with example usage: test_scan_non_pure_rv_output() without return types