code: def test_hierarchical_logp():
      """Make sure there are no random variables in a model's log-likelihood graph."""
      with pm.Model() as m:
          x = pm.Uniform("x", lower=0, upper=1)
          y = pm.Uniform("y", lower=0, upper=x)
  
      logp_ancestors = list(ancestors([m.logp()]))
      ops = {a.owner.op for a in logp_ancestors if a.owner}
      assert len(ops) > 0
      assert not any(isinstance(o, RandomVariable) for o in ops)
      assert m.rvs_to_values[x] in logp_ancestors
      assert m.rvs_to_values[y] in logp_ancestors
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy.stats.distributions
  from pytensor.graph.basic import ancestors, equal_computations
  from pytensor.tensor.random.op import RandomVariable
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1, IncSubtensor
  import pymc
  from pymc.logprob.basic import conditional_logp, icdf, logcdf, logp, transformed_conditional_logp
  from pymc.logprob.transforms import LogTransform
  from pymc.logprob.utils import replace_rvs_by_values
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 12 for calling a global function with example usage: test_hierarchical_logp() without return types