def _create_diff(diff, fun, key, prev, curr):
 if (not fun(prev)):
  _create_diff_action(diff, 'added', key, curr)
 elif (fun(prev) and (not fun(curr))):
  _create_diff_action(diff, 'removed', key, prev)
 elif (not fun(curr)):
  _create_diff_action(diff, 'updated', key, curr)

def _create_diff ( diff , fun , key , prev , curr ) : if ( not fun ( prev ) ) : _create_diff_action ( diff , 'added' , key , curr ) elif ( fun ( prev ) and ( not fun ( curr ) ) ) : _create_diff_action ( diff , 'removed' , key , prev ) elif ( not fun ( curr ) ) : _create_diff_action ( diff , 'updated' , key , curr )
builds the diff dictionary .