class_docstr: Descriptor of a certain domain that consists of discrete elements that
  are characterized by a coordinate system and a topology:
  the coordinate system is specified through a coordinate array
  the topology encodes the neighboring system
class_docstr_tok: ["Descriptor","of","a","certain","domain","that","consists","of","discrete","elements","that","are","characterized","by","a","coordinate","system","and","a","topology",":","the","coordinate","system","is","specified","through","a","coordinate","array","the","topology","encodes","the","neighboring","system"]
docstr: Compute a statistical representative of the within-Foain feature
  
  Parameters
  ----------
  fid: string, feature id
  method: string, method used to compute a representative
          to be chosen among 'mean', 'max', 'median', 'min'
code: def representative_feature(self, fid, method):
      """Compute a statistical representative of the within-Foain feature
  
      Parameters
      ----------
      fid: string, feature id
      method: string, method used to compute a representative
              to be chosen among 'mean', 'max', 'median', 'min'
  
      """
      f = self.get_feature(fid)
      if method == "mean":
          return np.mean(f, 0)
      if method == "min":
          return np.min(f, 0)
      if method == "max":
          return np.max(f, 0)
      if method == "median":
          return np.median(f, 0)
  
imports: import numpy
  import scipy.sparse
  from nibabel import Nifti1Image, load, save
  from nipy.algorithms.graph import WeightedGraph, wgraph_from_3d_grid, wgraph_from_coo_matrix
  from nipy.io.nibcompat import get_affine, get_header
label_desc: Use image node_id 9 for calling the DiscreteDomain obj's underlying member method code with example usage: obj.representative_feature(fid, method) and returns: np, np, np, np