code: def clipped_beta_rvs(
      a, b, size=None, random_state=None, dtype="float64"
  ):
      """Draw beta distributed random samples in the open :math:`(0, 1)` interval.
  
      The samples are generated with ``scipy.stats.beta.rvs``, but any value that
      is equal to 0 or 1 will be shifted towards the next floating point in the
      interval :math:`[0, 1]`, depending on the floating point precision that is
      given by ``dtype``.
  
      Parameters
      ----------
      a : float or array_like of floats
          Alpha, strictly positive (>0).
      b : float or array_like of floats
          Beta, strictly positive (>0).
      size : int or tuple of ints, optional
          Output shape.  If the given shape is, e.g., ``(m, n, k)``, then
          ``m * n * k`` samples are drawn.  If size is ``None`` (default),
          a single value is returned if ``a`` and ``b`` are both scalars.
          Otherwise, ``np.broadcast(a, b).size`` samples are drawn.
      dtype : str or dtype instance
          The floating point precision that the samples should have. This also
          determines the value that will be used to shift any samples returned
          by the numpy random number generator that are zero or one.
  
      Returns
      -------
      out : ndarray or scalar
          Drawn samples from the parameterized beta distribution. The scipy
          implementation can yield values that are equal to zero or one. We
          assume the support of the Beta distribution to be in the open interval
          :math:`(0, 1)`, so we shift any sample that is equal to 0 to
          ``np.nextafter(0, 1, dtype=dtype)`` and any sample that is equal to 1
          is shifted to ``np.nextafter(1, 0, dtype=dtype)``.
  
      """
      out = scipy.stats.beta.rvs(
          a, b, size=size, random_state=random_state
      ).astype(dtype)
      lower, upper = _beta_clip_values[dtype]
      return np.maximum(np.minimum(out, upper), lower)
  
imports: import warnings
  from functools import partial
  from typing import Iterable
  import numpy
  import pytensor
  import pytensor.tensor
  import scipy.linalg
  import scipy.stats
  from pytensor.graph.basic import Apply, Variable
  from pytensor.graph.op import Op
  from pytensor.scalar import UnaryScalarOp, upgrade_to_float_no_complex
  from pytensor.tensor import gammaln
  from pytensor.tensor.elemwise import Elemwise
  from pymc.distributions.shape_utils import to_tuple
  from pymc.logprob.utils import CheckParameterValue
  from pymc.pytensorf import floatX
label_desc: Use image node_id 16 for calling a global function with example usage: clipped_beta_rvs(a, b, size, random_state, dtype) and returns: np