code: def _exclusion_map(i, ref, target, targeti):
      """Ancillary function to determine admissible values of some position
      within some predefined values
  
      Parameters
      ----------
      i (int): index of the structure under consideration
      ref: Field that represent the topological structure of parcels
           and their standard position
      target= array of shape (ref.V,3): current position of the parcels
      targeti array of shape (n,3): possible new positions for the ith item
  
      Returns
      -------
      emap: array of shape (n): a potential that yields the fitness
            of the proposed positions given the current configuration
      rmin (double): ancillary parameter
      """
      xyz = ref.field
      fd = target.shape[1]
      ln = ref.list_of_neighbors()
      j = ln[i]
      j = np.reshape(j, np.size(j))
      rmin = 0
      if np.size(j) > 0:
          dx = np.reshape(xyz[j] - xyz[i], (np.size(j), fd))
          rmin = np.mean(np.sum(dx**2, 1)) / 4
          u0 = xyz[i] + np.mean(target[j] - xyz[j], 0)
          emap = rmin - np.sum((targeti - u0) ** 2, 1)
          for k in j:
              amap = np.sum((targeti - target[k]) ** 2, 1) - rmin / 4
              emap[amap < 0] = amap[amap < 0]
      else:
          emap = np.zeros(targeti.shape[0])
      return emap, rmin
  
file_path: nipy/nipy/labs/spatial_models/hierarchical_parcellation.py
imports: from warnings import warn
  import numpy
  from numpy.random import rand
  from nipy.algorithms.clustering.utils import kmeans, voronoi
  from nipy.algorithms.graph.field import Field
  from nipy.algorithms.graph.graph import wgraph_from_coo_matrix
  from .parcellation import MultiSubjectParcellation
label_desc: Use image node_id 5 for calling a global function with example usage: _exclusion_map(i, ref, target, targeti) and returns: emap,  rmin