class_docstr: Dictionary of :class:`Statistics` object allowing to compute
  statistics on multiple keys using a single call to :meth:`compile`. It
  takes a set of key-value pairs associating a statistics object to a
  unique name. This name can then be used to retrieve the statistics object.
  
  The following code computes statistics simultaneously on the length and
  the first value of the provided objects.
  ::
  
      >>> from operator import itemgetter
      >>> import numpy
      >>> len_stats = Statistics(key=len)
      >>> itm0_stats = Statistics(key=itemgetter(0))
      >>> mstats = MultiStatistics(length=len_stats, item=itm0_stats)
      >>> mstats.register("mean", numpy.mean, axis=0)
      >>> mstats.register("max", numpy.max, axis=0)
      >>> mstats.compile([[0.0, 1.0, 1.0, 5.0], [2.0, 5.0]])  # doctest: +SKIP
      {'length': {'mean': 3.0, 'max': 4}, 'item': {'mean': 1.0, 'max': 2.0}}
class_docstr_tok: ["Dictionary","of",":","class",":","`","Statistics","`","object","allowing","to","compute","statistics","on","multiple","keys","using","a","single","call","to",":","meth",":","`","compile","`",".","It","takes","a","set","of","key-value","pairs","associating","a","statistics","object","to","a","unique","name",".","This","name","can","then","be","used","to","retrieve","the","statistics","object",".","The","following","code","computes","statistics","simultaneously","on","the","length","and","the","first","value","of","the","provided","objects",".",":",":",">",">",">","from","operator","import","itemgetter",">",">",">","import","numpy",">",">",">","len_stats","=","Statistics","(","key=len",")",">",">",">","itm0_stats","=","Statistics","(","key=itemgetter","(","0",")",")",">",">",">","mstats","=","MultiStatistics","(","length=len_stats",",","item=itm0_stats",")",">",">",">","mstats.register","(","``","mean","''",",","numpy.mean",",","axis=0",")",">",">",">","mstats.register","(","``","max","''",",","numpy.max",",","axis=0",")",">",">",">","mstats.compile","(","[","[","0.0",",","1.0",",","1.0",",","5.0","]",",","[","2.0",",","5.0","]","]",")","#","doctest",":","+SKIP","{","'length","'",":","{","'mean","'",":","3.0",",","'max","'",":","4","}",",","'item","'",":","{","'mean","'",":","1.0",",","'max","'",":","2.0","}","}"]
code: def fields(self):
      return sorted(self.keys())
  
imports: from bisect import bisect_right
  from collections import defaultdict
  from copy import deepcopy
  from functools import partial
  from itertools import chain
  from operator import eq
label_desc: Use image node_id 2 for calling the MultiStatistics obj's underlying member method code with example usage: obj.fields() and returns: sorted