code: def logpdf(
      x: ArrayLike, loc: ArrayLike = 0, scale: ArrayLike = 1
  ) -> Array:
      x, loc, scale = promote_args_inexact(
          "laplace.logpdf", x, loc, scale
      )
      two = _lax_const(x, 2)
      linear_term = lax.div(lax.abs(lax.sub(x, loc)), scale)
      return lax.neg(lax.add(linear_term, lax.log(lax.mul(two, scale))))
  
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 1 for calling a global function with example usage: logpdf(x, loc, scale) and returns: lax