code: def round_logprob(op, values, base_rv, **kwargs):
      r"""Logprob of a rounded censored distribution
  
      The probability of a distribution rounded to the nearest integer is given by
      .. math::
          \begin{cases}
              \text{CDF}(x+\frac{1}{2}, dist) - \text{CDF}(x-\frac{1}{2}, dist) & \text{for } x \in \mathbb{Z}, \\
              0 & \text{otherwise},
          \end{cases}
  
      The probability of a distribution rounded up is given by
      .. math::
          \begin{cases}
              \text{CDF}(x, dist) - \text{CDF}(x-1, dist) & \text{for } x \in \mathbb{Z}, \\
              0 & \text{otherwise},
          \end{cases}
  
      The probability of a distribution rounded down is given by
      .. math::
          \begin{cases}
              \text{CDF}(x+1, dist) - \text{CDF}(x, dist) & \text{for } x \in \mathbb{Z}, \\
              0 & \text{otherwise},
          \end{cases}
  
      """
      (value,) = values
  
      if isinstance(op.scalar_op, RoundHalfToEven):
          value = pt.round(value)
          value_upper = value + 0.5
          value_lower = value - 0.5
      elif isinstance(op.scalar_op, Floor):
          value = pt.floor(value)
          value_upper = value + 1.0
          value_lower = value
      elif isinstance(op.scalar_op, Ceil):
          value = pt.ceil(value)
          value_upper = value
          value_lower = value - 1.0
      else:
          raise TypeError(
              f"Unsupported scalar_op {op.scalar_op}"
          )  # pragma: no cover
  
      base_rv_op = base_rv.owner.op
      base_rv_inputs = base_rv.owner.inputs
  
      logcdf_upper = _logcdf(
          base_rv_op, value_upper, *base_rv_inputs, **kwargs
      )
      logcdf_lower = _logcdf(
          base_rv_op, value_lower, *base_rv_inputs, **kwargs
      )
  
      if base_rv_op.name:
          logcdf_upper.name = f"{base_rv_op}_logcdf_upper"
          logcdf_lower.name = f"{base_rv_op}_logcdf_lower"
  
      # TODO: Figure out better solution to avoid this circular import
      from pymc.math import logdiffexp
  
      return logdiffexp(logcdf_upper, logcdf_lower)
  
imports: from typing import List, Optional
  import numpy
  import pytensor.tensor
  from pytensor.graph.basic import Node
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.rewriting.basic import node_rewriter
  from pytensor.scalar.basic import Ceil, Clip, Floor, RoundHalfToEven
  from pytensor.scalar.basic import clip
  from pytensor.tensor.math import ceil, clip, floor, round_half_to_even
  from pytensor.tensor.variable import TensorConstant
  from pymc.logprob.abstract import MeasurableElemwise, _logcdf, _logprob
  from pymc.logprob.rewriting import PreserveRVMappings, measurable_ir_rewrites_db
  from pymc.logprob.utils import CheckParameterValue
label_desc: Use image node_id 4 for calling a global function with example usage: round_logprob(op, values, base_rv) and returns: logdiffexp