def modify_group(group, params, immediate=False):
 changed = {}
 new_params = dict(params)
 for key in new_params.keys():
  if (key in group):
   param = group[key]
   new_value = new_params[key]
   try:
    old_value = param.value
   except ValueError:
    old_value = param._value
   if (old_value != new_value):
    if (not param.is_modifiable):
     raise NotModifiableError(('Parameter %s is not modifiable.' % key))
    changed[key] = {'old': old_value, 'new': new_value}
    set_parameter(param, new_value, immediate)
    del new_params[key]
 return (changed, new_params)

def modify_group ( group , params , immediate = False ) : changed = { } new_params = dict ( params ) for key in new_params . keys ( ) : if ( key in group ) : param = group [ key ] new_value = new_params [ key ] try : old_value = param . value except ValueError : old_value = param . _value if ( old_value != new_value ) : if ( not param . is_modifiable ) : raise NotModifiableError ( ( 'Parameter %s is not modifiable.' % key ) ) changed [ key ] = { 'old' : old_value , 'new' : new_value } set_parameter ( param , new_value , immediate ) del new_params [ key ] return ( changed , new_params )
set all of the params in a group to the provided new params .