#NEWLINE# def _merge_map( key , values , partial ) : #NEWLINE# #INDENT# 'A map function used in merge phase.\n\n  Stores (key, values) into KeyValues proto and yields its serialization.\n\n  Args:\n    key: values key.\n    values: values themselves.\n    partial: True if more values for this key will follow. False otherwise.\n\n  Yields:\n    The proto.\n  ' #NEWLINE# proto = kv_pb . KeyValues ( ) #NEWLINE# proto . set_key ( partial ) #NEWLINE# proto . value_list ( ) . extend ( values ) #NEWLINE# ( yield proto . Encode ( ) )