code: def Matern52(ls, x1, x2=None, grad=False):
      r2 = np.abs(dist2(ls, x1, x2))
      r = np.sqrt(r2)
      cov = (1.0 + SQRT_5 * r + (5.0 / 3.0) * r2) * np.exp(-SQRT_5 * r)
      if grad:
          return (cov, grad_Matern52(ls, x1, x2))
      else:
          return cov
  
file_path: auptimizer/src/aup/Proposer/spearmint/gp.py
imports: import numpy
  import scipy.linalg
  import scipy.optimize
  import scipy.io
label_desc: Use image node_id 8 for calling a global function with example usage: Matern52(ls, x1, x2, grad) and returns: cov,  grad_Matern52, cov