code: def delta_logp(model, q, q0):
      """Function for calculating acceptance criteria"""
      val = model.logp(q) - model.logp(q0)
      val = min(1, np.exp(val))
  
      return val
  
imports: from __future__ import division
  import scipy.linalg
  import numpy
  import numpy.random
label_desc: Use image node_id 3 for calling a global function with example usage: delta_logp(model, q, q0) and returns: val