def _create_diff_action(diff, diff_key, key, value):
 if (diff_key not in diff.keys()):
  diff[diff_key] = {}
 diff[diff_key][key] = value

def _create_diff_action ( diff , diff_key , key , value ) : if ( diff_key not in diff . keys ( ) ) : diff [ diff_key ] = { } diff [ diff_key ] [ key ] = value
dry to build diff parts .