code: def _dle(p, q, src, stc):
      """Aux function to compute dipole localization error."""
      p = _abs_col_sum(p)
      q = _abs_col_sum(q)
      idx1 = np.nonzero(p)[0]
      idx2 = np.nonzero(q)[0]
      points = []
      for i in range(len(src)):
          points.append(src[i]["rr"][stc.vertices[i]])
      points = np.concatenate(points, axis=0)
      if len(idx1) and len(idx2):
          D = cdist(points[idx1], points[idx2])
          D_min_1 = np.min(D, axis=0)
          D_min_2 = np.min(D, axis=1)
          return (np.mean(D_min_1) + np.mean(D_min_2)) / 2.0
      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 10 for calling a global function with example usage: _dle(p, q, src, stc) and returns: unknown, np