code: def test_affine_log_transform_rv():
      a, b = pt.scalars("a", "b")
      base_rv = pt.random.lognormal(0, 1, name="base_rv", size=(1, 2))
      y_rv = a + pt.log(base_rv) * b
      y_rv.name = "y"
  
      y_vv = y_rv.clone()
  
      logprob = logp(y_rv, y_vv)
      logp_fn = pytensor.function([a, b, y_vv], logprob)
  
      a_val = -1.5
      b_val = 3.0
      y_val = [[0.1, 0.1]]
  
      assert np.allclose(
          logp_fn(a_val, b_val, y_val),
          st.norm(a_val, b_val).logpdf(y_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 7 for calling a global function with example usage: test_affine_log_transform_rv() without return types