<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def summarise( self, results ):
 """Generate a summary of results from a list of result dicts returned by running the underlying experiment. By default we generate mean, median, variance, and extrema for each value recorded. Override this method to create different or extra summary statistics. :param results: an array of result dicts :returns: a dict of summary statistics"""

        if len(results) == 0:
            return dict()
        else:
            summary = dict()

            # work out the fields to summarise
            allKeys = results[0][Experiment.RESULTS].keys()
            ks = self._summarised_results
            if ks is None:
                # if we don't restrict, summarise all keys
                ks = allKeys
            else:
                # protect against a key that's not present
                ks = [ k for k in ks if k in allKeys ]
                
            # add the summary statistics
            for k in ks:
                # compute summaries for all fields we're interested in
                vs = [ res[Experiment.RESULTS][k] for res in results ]
                summary[self._mean(k)]     = numpy.mean(vs)
                summary[self._median(k)]   = numpy.median(vs)
                summary[self._variance(k)] = numpy.var(vs)
                summary[self._min(k)]      = numpy.min(vs)
                summary[self._max(k)]      = numpy.max(vs)
                    
            return summary