code: def test_one_sided_clip():
      x_rv = pt.random.normal(0, 1)
      lb_cens_x_rv = pt.clip(x_rv, -1, x_rv)
      ub_cens_x_rv = pt.clip(x_rv, x_rv, 1)
  
      lb_cens_x_vv = lb_cens_x_rv.clone()
      ub_cens_x_vv = ub_cens_x_rv.clone()
  
      lb_logp = pt.sum(logp(lb_cens_x_rv, lb_cens_x_vv))
      ub_logp = pt.sum(logp(ub_cens_x_rv, ub_cens_x_vv))
      assert_no_rvs(lb_logp)
      assert_no_rvs(ub_logp)
  
      logp_fn = pytensor.function(
          [lb_cens_x_vv, ub_cens_x_vv], [lb_logp, ub_logp]
      )
      ref_scipy = st.norm(0, 1)
  
      assert np.all(np.array(logp_fn(-2, 2)) == -np.inf)
      assert np.all(np.array(logp_fn(2, -2)) != -np.inf)
      np.testing.assert_almost_equal(
          logp_fn(-1, 1), ref_scipy.logcdf(-1)
      )
      np.testing.assert_almost_equal(
          logp_fn(1, -1), ref_scipy.logpdf(-1)
      )
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy
  import scipy.stats
  from pymc import logp
  from pymc.logprob import conditional_logp
  from pymc.logprob.transform_value import TransformValuesRewrite
  from pymc.logprob.transforms import LogTransform
  from pymc.testing import assert_no_rvs
label_desc: Use image node_id 3 for calling a global function with example usage: test_one_sided_clip() without return types