class_docstr: Create a Bound variable object that can be applied to create
  a new upper, lower, or upper and lower bounded distribution.
  
  The resulting distribution is not normalized anymore. This
  is usually fine if the bounds are constants. If you need
  truncated distributions, use `Bound` in combination with
  a :class:`~pymc.model.Potential` with the cumulative probability function.
  
  The bounds are inclusive for discrete distributions.
  
  Parameters
  ----------
  dist : PyMC unnamed distribution
      Distribution to be transformed into a bounded distribution created via the
      `.dist()` API.
  lower : float or array like, optional
      Lower bound of the distribution.
  upper : float or array like, optional
      Upper bound of the distribution.
  
  Examples
  --------
  .. code-block:: python
  
      with pm.Model():
          normal_dist = pm.Normal.dist(mu=0.0, sigma=1.0)
          negative_normal = pm.Bound("negative_normal", normal_dist, upper=0.0)
class_docstr_tok: ["Create","a","Bound","variable","object","that","can","be","applied","to","create","a","new","upper",",","lower",",","or","upper","and","lower","bounded","distribution",".","The","resulting","distribution","is","not","normalized","anymore",".","This","is","usually","fine","if","the","bounds","are","constants",".","If","you","need","truncated","distributions",",","use","`","Bound","`","in","combination","with","a",":","class",":","`","~pymc.model.Potential","`","with","the","cumulative","probability","function",".","The","bounds","are","inclusive","for","discrete","distributions",".","Parameters","--","--","--","--","--","dist",":","PyMC","unnamed","distribution","Distribution","to","be","transformed","into","a","bounded","distribution","created","via","the","`",".dist","(",")","`","API",".","lower",":","float","or","array","like",",","optional","Lower","bound","of","the","distribution",".","upper",":","float","or","array","like",",","optional","Upper","bound","of","the","distribution",".","Examples","--","--","--","--","..","code-block",":",":","python","with","pm.Model","(",")",":","normal_dist","=","pm.Normal.dist","(","mu=0.0",",","sigma=1.0",")","negative_normal","=","pm.Bound","(","``","negative_normal","''",",","normal_dist",",","upper=0.0",")"]
code: def dist(
      cls,
      dist,
      lower=None,
      upper=None,
      size=None,
      shape=None,
      **kwargs,
  ):
      cls._argument_checks(dist, **kwargs)
      lower, upper, initval = cls._set_values(
          lower, upper, size, shape, initval=None
      )
      if isinstance(dist.owner.op, Continuous):
          res = _ContinuousBounded.dist(
              [dist, lower, upper],
              size=size,
              shape=shape,
              **kwargs,
          )
          res.tag.test_value = floatX(initval)
      else:
          res = _DiscreteBounded.dist(
              [dist, lower, upper],
              size=size,
              shape=shape,
              **kwargs,
          )
          res.tag.test_value = intX(initval)
      return res
  
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 2 for calling the Bound obj's underlying member method code with example usage: obj.dist(cls, dist, lower, upper, size, shape) and returns: res