code: def _peak_position_error(p, q, r_est, r_true):
      q = _abs_col_sum(q)
      if np.sum(q):
          q /= np.sum(q)
          r_est_mean = np.dot(q, r_est)
          return np.linalg.norm(r_est_mean - r_true)
      else:
          return np.inf
  
imports: from functools import partial
  import numpy
  from scipy.spatial.distance import cdist
  from ...utils import _check_option, _validate_type, fill_doc
label_desc: Use image node_id 21 for calling a global function with example usage: _peak_position_error(p, q, r_est, r_true) and returns: np, np