code: def _mean_of_runs(stats, key='runs'):
      
  
      num_runs = len(stats[key])
      first = stats[key][0]
  
      mean = {}
      for stat_key in first:
          # Skip non numberic attributes
          if isinstance(first[stat_key], numbers.Number):
              mean[stat_key] = sum(run[stat_key]
                                   for run in stats[key]) / float(num_runs)
  
      return mean
docs: Obtain the mean of stats.
  
      Args:
          stats: dict; A set of stats, structured as above.
          key: str; Optional key to determine where list of runs is found in stats