code: def test_deterministic_cumsum():
      """Test that deterministic cumsum is not affected"""
      x_rv = pt.random.normal(1, 1, size=5)
      cumsum_x_rv = pt.cumsum(x_rv)
      y_rv = pt.random.normal(cumsum_x_rv, 1)
  
      x_vv = x_rv.clone()
      y_vv = y_rv.clone()
  
      logp = conditional_logp({x_rv: x_vv, y_rv: y_vv})
      logp_combined = pt.sum(
          [pt.sum(factor) for factor in logp.values()]
      )
      assert_no_rvs(logp_combined)
  
      logp_fn = pytensor.function([x_vv, y_vv], logp_combined)
      assert np.isclose(
          logp_fn(np.ones(5), np.arange(5) + 1).sum(),
          st.norm(1, 1).logpdf(1) * 10,
      )
  
file_path: pymc/tests/logprob/test_cumsum.py
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy.stats
  from pymc import logp
  from pymc.logprob.basic import conditional_logp
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 4 for calling a global function with example usage: test_deterministic_cumsum() without return types