#NEWLINE# def parse_diff_hist( curr_obj , diff_hist ) : #NEWLINE# #INDENT# 'Given a diff_hist as created, appended by append_diff_hist, yield the\n    versions of the object start with curr_obj and working backwards in time.\n    Each instance yielded is of the form (obj, date-string) where obj is the\n    JSON version of the object created by applying a diff in the\n    diff history and date-string is a string representing the date/time that\n    the diff was taken' #NEWLINE# ( curr_obj , diff_hist ) = _norm_json_params ( curr_obj , diff_hist ) #NEWLINE# ( yield ( json . dumps ( curr_obj ) , None ) ) #NEWLINE# last_obj = curr_obj #NEWLINE# for one in reversed ( diff_hist ) : #NEWLINE# #INDENT# last_obj = record_patch ( diff_hist , one [ 'diff' ] ) #NEWLINE# ( yield ( json . dumps ( last_obj ) , one [ 'diff_date' ] ) )