Tell me about your experience with basic programming data structures and distributed data computing with Spark.
Implement the map-and-reduce portion in Python: aggregate values for identical keys, then return the k largest totals. Break ties by ascending key order. Use def top_k_aggregates(records, k):, where records is a list of [string, integer] pairs and the output is a list of [key, total] pairs.
def top_k_aggregates(records, k):