code: def test_affine_transform_rv():
      loc = pt.scalar("loc")
      scale = pt.vector("scale")
      rv_size = 3
  
      y_rv = (
          loc
          + pt.random.normal(0, 1, size=rv_size, name="base_rv") * scale
      )
      y_rv.name = "y"
      y_vv = y_rv.clone()
  
      logprob = logp(y_rv, y_vv)
      assert_no_rvs(logprob)
      logp_fn = pytensor.function([loc, scale, y_vv], logprob)
  
      loc_test_val = 4.0
      scale_test_val = np.full(rv_size, 0.5)
      y_test_val = np.full(rv_size, 1.0)
  
      np.testing.assert_allclose(
          logp_fn(loc_test_val, scale_test_val, y_test_val),
          st.norm(loc_test_val, scale_test_val).logpdf(y_test_val),
      )
  
file_path: pymc/tests/logprob/test_composite_logprob.py
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy.stats
  from pymc import draw, logp
  from pymc.logprob.abstract import MeasurableVariable
  from pymc.logprob.basic import conditional_logp
  from pymc.logprob.rewriting import construct_ir_fgraph
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 6 for calling a global function with example usage: test_affine_transform_rv() without return types