def _compare_keys(key_record1, key_record2):
 return cmp(key_record1[0], key_record2[0])

def _compare_keys ( key_record1 , key_record2 ) : return cmp ( key_record1 [ 0 ] , key_record2 [ 0 ] )
compare two protos by key .