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