code: def logpdf(
      x: np.ndarray,
      a: Union[np.ndarray, float],
      b: Union[np.ndarray, float],
      loc: Union[np.ndarray, float] = 0,
      scale: Union[np.ndarray, float] = 1,
  ) -> np.ndarray:
      x = (x - loc) / scale
  
      x, a, b = np.atleast_1d(x, a, b)
  
      out = _norm_logpdf(x) - _log_gauss_mass(a, b) - np.log(scale)
  
      x, a, b = np.broadcast_arrays(x, a, b)
      out[(x < a) | (b < x)] = -np.inf
      out[a == b] = math.nan
  
      return out
  
imports: import functools
  import math
  import sys
  from typing import Callable
  from typing import Optional
  from typing import Union
  import numpy
  from optuna.samplers._tpe._erf import erf
label_desc: Use image node_id 14 for calling a global function with example usage: logpdf(x, a, b, loc, scale) and returns: out