code: def test_rounding(rounding_op):
      loc = 1
      scale = 2
      test_value = np.arange(-3, 4)
  
      x = pt.random.normal(loc, scale, size=test_value.shape, name="x")
      xr = rounding_op(x)
      xr.name = "xr"
  
      xr_vv = xr.clone()
      logprob = logp(xr, xr_vv)
      assert logprob is not None
  
      x_sp = st.norm(loc, scale)
      if rounding_op == pt.round:
          expected_logp = np.log(
              x_sp.cdf(test_value + 0.5) - x_sp.cdf(test_value - 0.5)
          )
      elif rounding_op == pt.floor:
          expected_logp = np.log(
              x_sp.cdf(test_value + 1.0) - x_sp.cdf(test_value)
          )
      elif rounding_op == pt.ceil:
          expected_logp = np.log(
              x_sp.cdf(test_value) - x_sp.cdf(test_value - 1.0)
          )
      else:
          raise NotImplementedError()
  
      assert np.allclose(
          logprob.eval({xr_vv: test_value}),
          expected_logp,
      )
  
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 12 for calling a global function with example usage: test_rounding(rounding_op) without return types