code: def is_spd(M, decimal=15, verbose=1):
      """Assert that input matrix is symmetric positive definite.
  
      M must be symmetric down to specified decimal places.
      The check is performed by checking that all eigenvalues are positive.
  
      Parameters
      ----------
      M : numpy.ndarray
          Symmetric positive definite matrix.
  
      decimal : int, default=15
          Decimal.
  
      verbose : int, default=1
          Verbosity level (0 means no message).
  
      Returns
      -------
      answer : boolean
          True if matrix is symmetric positive definite, False otherwise.
  
      """
      if not np.allclose(M, M.T, atol=0, rtol=10**-decimal):
          if verbose > 0:
              print(f"matrix not symmetric to {decimal:d} decimals")
          return False
      eigvalsh = np.linalg.eigvalsh(M)
      ispd = eigvalsh.min() > 0
      if not ispd and verbose > 0:
          print(
              f"matrix has a negative eigenvalue: {eigvalsh.min():.3f}"
          )
      return ispd
  
label_desc: Use image node_id 2 for calling a global function with example usage: is_spd(M, decimal, verbose) and returns: ispd, False