code: def make_aggregate(docs, aggregations):
      
      new_doc = dict(docs[0])
  
      for keyname, aggregation_function in aggregations:
          new_doc[keyname] = aggregation_function(docs)
  
      return new_doc
docs: Given `docs` and `aggregations` return a single document with the
      aggregations applied.