docstr: Calculate log-probability of Bounded distribution at specified value.
  
  Parameters
  ----------
  value: numeric
      Value for which log-probability is calculated.
  distribution: TensorVariable
      Distribution which is being bounded
  lower: numeric
      Lower bound for the distribution being bounded.
  upper: numeric
      Upper bound for the distribution being bounded.
  
  Returns
  -------
  TensorVariable
docstr_tok: ["Calculate","log-probability","of","Bounded","distribution","at","specified","value",".","Parameters","--","--","--","--","--","value",":","numeric","Value","for","which","log-probability","is","calculated",".","distribution",":","TensorVariable","Distribution","which","is","being","bounded","lower",":","numeric","Lower","bound","for","the","distribution","being","bounded",".","upper",":","numeric","Upper","bound","for","the","distribution","being","bounded",".","Returns","--","--","--","-","TensorVariable"]
code: def logp(value, distribution, lower, upper):
      """
      Calculate log-probability of Bounded distribution at specified value.
  
      Parameters
      ----------
      value: numeric
          Value for which log-probability is calculated.
      distribution: TensorVariable
          Distribution which is being bounded
      lower: numeric
          Lower bound for the distribution being bounded.
      upper: numeric
          Upper bound for the distribution being bounded.
  
      Returns
      -------
      TensorVariable
      """
      res = pt.switch(
          pt.or_(pt.lt(value, lower), pt.gt(value, upper)),
          -np.inf,
          logp(distribution, value),
      )
  
      return check_parameters(
          res,
          lower <= upper,
          msg="lower <= upper",
      )
  
imports: import warnings
  import numpy
  import pytensor.tensor
  from pytensor.tensor import as_tensor_variable
  from pytensor.tensor.random.op import RandomVariable
  from pytensor.tensor.variable import TensorVariable
  from pymc.distributions.continuous import BoundedContinuous, bounded_cont_transform
  from pymc.distributions.dist_math import check_parameters
  from pymc.distributions.distribution import Continuous, Discrete
  from pymc.distributions.shape_utils import to_tuple
  from pymc.distributions.transforms import _default_transform
  from pymc.logprob.basic import logp
  from pymc.model import modelcontext
  from pymc.pytensorf import floatX, intX
  from pymc.util import check_dist_not_registered
label_desc: Use image node_id 1 for calling the _ContinuousBounded obj's underlying member method code with example usage: obj.logp(value, distribution, lower, upper) and returns: check_parameters