def update_nested_dict(main_dict, new_dict):
 for (name, rc_dict) in six.iteritems(new_dict):
  if (name in main_dict):
   main_dict[name].update(rc_dict)
  else:
   main_dict[name] = rc_dict
 return main_dict

def update_nested_dict ( main_dict , new_dict ) : for ( name , rc_dict ) in six . iteritems ( new_dict ) : if ( name in main_dict ) : main_dict [ name ] . update ( rc_dict ) else : main_dict [ name ] = rc_dict return main_dict
update nested dict with new values .