code: def test_basic(self, symbolic_rv, apply_transforms):
      # Interval transform between last two arguments
      interval = (
          Interval(bounds_fn=lambda *args: (args[-2], args[-1]))
          if apply_transforms
          else None
      )
  
      with pm.Model() as m:
          a = pm.Uniform("a", 0.0, 1.0)
          if symbolic_rv:
              raw_b = pm.Uniform.dist(0, a + 1.0)
              b = pm.Censored(
                  "b", raw_b, lower=0, upper=a + 1.0, transform=interval
              )
              # If not True, another distribution has to be used
              assert isinstance(b.owner.op, SymbolicRandomVariable)
          else:
              b = pm.Uniform("b", 0, a + 1.0, transform=interval)
          c = pm.Normal("c")
          d = pt.log(c + b) + 2.0
  
      a_value_var = m.rvs_to_values[a]
      assert m.rvs_to_transforms[a] is not None
  
      b_value_var = m.rvs_to_values[b]
      c_value_var = m.rvs_to_values[c]
  
      (res,) = replace_rvs_by_values(
          (d,),
          rvs_to_values=m.rvs_to_values,
          rvs_to_transforms=m.rvs_to_transforms,
      )
  
      assert res.owner.op == pt.add
      log_output = res.owner.inputs[0]
      assert log_output.owner.op == pt.log
      log_add_output = res.owner.inputs[0].owner.inputs[0]
      assert log_add_output.owner.op == pt.add
      c_output = log_add_output.owner.inputs[0]
  
      # We make sure that the random variables were replaced
      # with their value variables
      assert c_output == c_value_var
      b_output = log_add_output.owner.inputs[1]
      # When transforms are applied, the input is the back-transformation of the value_var,
      # otherwise it is the value_var itself
      if apply_transforms:
          assert b_output != b_value_var
      else:
          assert b_output == b_value_var
  
      res_ancestors = list(ancestors((res,)))
      res_rv_ancestors = [
          v
          for v in res_ancestors
          if v.owner and isinstance(v.owner.op, RandomVariable)
      ]
  
      # There shouldn't be any `RandomVariable`s in the resulting graph
      assert len(res_rv_ancestors) == 0
      assert b_value_var in res_ancestors
      assert c_value_var in res_ancestors
      # When transforms are used, `d` depends on `a` through the back-transformation of
      # `b`, otherwise there is no direct connection between `d` and `a`
      if apply_transforms:
          assert a_value_var in res_ancestors
      else:
          assert a_value_var not in res_ancestors
  
imports: import numpy
  import pytensor
  import pytest
  from pytensor import function
  from pytensor import tensor
  from pytensor.compile import get_default_mode
  from pytensor.graph.basic import ancestors, equal_computations
  from pytensor.tensor.random.op import RandomVariable
  import pymc
  from pymc import SymbolicRandomVariable, inputvars
  from pymc.distributions.transforms import Interval
  from pymc.logprob.abstract import MeasurableVariable
  from pymc.logprob.basic import logp
  from pymc.logprob.utils import ParameterValueError, check_potential_measurability, dirac_delta, replace_rvs_by_values
  from pymc.testing import assert_no_rvs
  from tests.logprob.utils import create_pytensor_params, scipy_logprob_tester
label_desc: Use image node_id 1 for calling the TestReplaceRVsByValues obj's underlying member method code with example usage: obj.test_basic(symbolic_rv, apply_transforms) without return types