code: def test_measurable_power_exponent_with_constant_base():
      # test power(2, rv) = exp2(rv)
      # test negative base fails
      x_rv_pow = pt.pow(2, pt.random.normal())
      x_rv_exp2 = pt.exp2(pt.random.normal())
  
      x_vv_pow = x_rv_pow.clone()
      x_vv_exp2 = x_rv_exp2.clone()
  
      x_logp_fn_pow = pytensor.function(
          [x_vv_pow], pt.sum(logp(x_rv_pow, x_vv_pow))
      )
      x_logp_fn_exp2 = pytensor.function(
          [x_vv_exp2], pt.sum(logp(x_rv_exp2, x_vv_exp2))
      )
  
      np.testing.assert_allclose(
          x_logp_fn_pow(0.1), x_logp_fn_exp2(0.1)
      )
  
      with pytest.raises(ParameterValueError, match="base >= 0"):
          x_rv_neg = pt.pow(-2, pt.random.normal())
          x_vv_neg = x_rv_neg.clone()
          logp(x_rv_neg, x_vv_neg)
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy
  import scipy.special
  from pytensor.graph.basic import equal_computations
  from pymc.distributions.continuous import Cauchy, ChiSquared
  from pymc.logprob.basic import conditional_logp, icdf, logcdf, logp
  from pymc.logprob.transforms import ArccoshTransform, ArcsinhTransform, ArctanhTransform, ChainedTransform, CoshTransform, ErfcTransform, ErfcxTransform, ErfTransform, ExpTransform, LocTransform, LogTransform, ScaleTransform, SinhTransform, TanhTransform, Transform
  from pymc.logprob.utils import ParameterValueError
  from pymc.testing import Rplusbig, Vector, assert_no_rvs
  from tests.distributions.test_transform import check_jacobian_det
label_desc: Use image node_id 7 for calling a global function with example usage: test_measurable_power_exponent_with_constant_base() without return types