code: def test_local_remove_TransformedVariable():
      p_rv = pt.random.beta(1, 1, name="p")
      p_vv = p_rv.clone()
  
      tr = TransformValuesRewrite({p_vv: logodds})
      [p_logp] = conditional_logp(
          {p_rv: p_vv}, extra_rewrites=tr
      ).values()
  
      assert not any(
          isinstance(v.owner.op, TransformedValue)
          for v in ancestors([p_logp])
          if v.owner
      )
  
file_path: pymc/tests/logprob/test_rewriting.py
imports: import numpy
  import pytensor.tensor
  import pytest
  import scipy.stats.distributions
  from pytensor.graph import ancestors
  from pytensor.graph.rewriting.basic import in2out
  from pytensor.graph.rewriting.utils import rewrite_graph
  from pytensor.tensor.elemwise import DimShuffle, Elemwise
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1, IncSubtensor, Subtensor
  from pymc.distributions.transforms import logodds
  from pymc.logprob.basic import conditional_logp
  from pymc.logprob.rewriting import cleanup_ir, local_lift_DiracDelta
  from pymc.logprob.transform_value import TransformedValue, TransformValuesRewrite
  from pymc.logprob.utils import DiracDelta, dirac_delta
label_desc: Use image node_id 3 for calling a global function with example usage: test_local_remove_TransformedVariable() without return types