code: def cdf(k: ArrayLike, p: ArrayLike) -> Array:
      k, p = promote_args_inexact("bernoulli.cdf", k, p)
      zero, one = _lax_const(k, 0), _lax_const(k, 1)
      conds = [
          jnp.isnan(k) | jnp.isnan(p) | (p < zero) | (p > one),
          lax.lt(k, zero),
          jnp.logical_and(lax.ge(k, zero), lax.lt(k, one)),
          lax.ge(k, one),
      ]
      vals = [jnp.nan, zero, one - p, one]
      return jnp.select(conds, vals)
  
file_path: jax/jax/_src/scipy/stats/bernoulli.py
imports: import scipy.stats
  from jax import lax
  import jax.numpy
  from jax._src.lax.lax import _const
  from jax._src.numpy.util import _wraps, promote_args_inexact
  from jax._src.typing import Array, ArrayLike
  from jax.scipy.special import xlogy, xlog1py
label_desc: Use image node_id 3 for calling a global function with example usage: cdf(k, p) and returns: jnp