code: def cdf(
      x: ArrayLike, loc: ArrayLike = 0, scale: ArrayLike = 1
  ) -> Array:
      x, loc, scale = promote_args_inexact("laplace.cdf", x, loc, scale)
      half = _lax_const(x, 0.5)
      one = _lax_const(x, 1)
      zero = _lax_const(x, 0)
      diff = lax.div(lax.sub(x, loc), scale)
      return lax.select(
          lax.le(diff, zero),
          lax.mul(half, lax.exp(diff)),
          lax.sub(one, lax.mul(half, lax.exp(lax.neg(diff)))),
      )
  
file_path: jax/jax/_src/scipy/stats/laplace.py
imports: import scipy.stats
  from jax import lax
  from jax._src.lax.lax import _const
  from jax._src.numpy.util import _wraps, promote_args_inexact
  from jax._src.typing import Array, ArrayLike
label_desc: Use image node_id 3 for calling a global function with example usage: cdf(x, loc, scale) and returns: lax