code: def test_transformed_rv_and_value():
      y_rv = pt.random.halfnormal(-1, 1, name="base_rv") + 1
      y_rv.name = "y"
      y_vv = y_rv.clone()
  
      transform_rewrite = TransformValuesRewrite({y_vv: LogTransform()})
  
      logp = conditional_logp(
          {y_rv: y_vv}, extra_rewrites=transform_rewrite
      )
      logp_combined = pt.sum(
          [pt.sum(factor) for factor in logp.values()]
      )
      assert_no_rvs(logp_combined)
      logp_fn = pytensor.function([y_vv], logp_combined)
  
      y_test_val = -5
  
      np.testing.assert_allclose(
          logp_fn(y_test_val),
          sp.stats.halfnorm(0, 1).logpdf(np.exp(y_test_val))
          + y_test_val,
      )
  
imports: import gc
  import operator
  import numpy
  import pytensor
  import pytest
  import scipy
  from numdifftools import Jacobian
  from pytensor import scan
  from pytensor import tensor
  from pytensor.compile.builders import OpFromGraph
  from pytensor.graph import FunctionGraph
  from pytensor.graph.basic import equal_computations
  import pymc
  from pymc.distributions.transforms import _default_transform, log, logodds
  from pymc.logprob import conditional_logp
  from pymc.logprob.abstract import MeasurableVariable, _logprob
  from pymc.logprob.transform_value import TransformValuesMapping, TransformValuesRewrite
  from pymc.logprob.transforms import ExpTransform, LogOddsTransform, LogTransform
  from pymc.testing import assert_no_rvs
  from tests.logprob.test_transforms import DirichletScipyDist
label_desc: Use image node_id 10 for calling a global function with example usage: test_transformed_rv_and_value() without return types