code: def statistics_from_position(target, data, sigma=1.0):
      """Return a number characterizing how close data is from
      target using a kernel-based statistic
  
      Parameters
      ----------
      target: array of shape(nt,anat_dim) or None
              the target positions
      data: array of shape(nd,anat_dim) or None
            the data position
      sigma=1.0 (float), kernel parameter
                or  a distance that say how good good is
  
      Returns
      -------
      sensitivity (float): how well the targets are fitted
                  by the data  in [0,1] interval
                  1 is good
                  0 is bad
      """
      from ...algorithms.utils.fast_distance import (
          euclidean_distance as ed,
      )
  
      if data is None:
          if target is None:
              return 0.0  # could be 1.0 ?
          else:
              return 0.0
      if target is None:
          return 0.0
  
      dmatrix = ed(data, target) / sigma
      sensitivity = dmatrix.min(0)
      sensitivity = np.exp(-0.5 * sensitivity**2)
      sensitivity = np.mean(sensitivity)
      return sensitivity
  
imports: import numpy
  from nipy.io.nibcompat import get_affine
  from nipy.labs.spatial_models.discrete_domain import grid_domain_from_binary_array
label_desc: Use image node_id 12 for calling a global function with example usage: statistics_from_position(target, data, sigma) and returns: sensitivity, int, int, int