def merge_environments(environment_files, files, params, param_schemata):
 if (not environment_files):
  return
 available_strategies = {}
 for filename in environment_files:
  raw_env = files[filename]
  parsed_env = env_fmt.parse(raw_env)
  strategies_in_file = parsed_env.pop(env_fmt.PARAMETER_MERGE_STRATEGIES, {})
  for (section_key, section_value) in parsed_env.items():
   if section_value:
    if (section_key in (env_fmt.PARAMETERS, env_fmt.PARAMETER_DEFAULTS)):
     (params[section_key], new_strategies) = merge_parameters(params[section_key], section_value, param_schemata, strategies_in_file, available_strategies, filename)
     available_strategies.update(new_strategies)
    else:
     params[section_key] = merge_map(params[section_key], section_value)

def merge_environments ( environment_files , files , params , param_schemata ) : if ( not environment_files ) : return available_strategies = { } for filename in environment_files : raw_env = files [ filename ] parsed_env = env_fmt . parse ( raw_env ) strategies_in_file = parsed_env . pop ( env_fmt . PARAMETER_MERGE_STRATEGIES , { } ) for ( section_key , section_value ) in parsed_env . items ( ) : if section_value : if ( section_key in ( env_fmt . PARAMETERS , env_fmt . PARAMETER_DEFAULTS ) ) : ( params [ section_key ] , new_strategies ) = merge_parameters ( params [ section_key ] , section_value , param_schemata , strategies_in_file , available_strategies , filename ) available_strategies . update ( new_strategies ) else : params [ section_key ] = merge_map ( params [ section_key ] , section_value )
merges environment files into the stack input parameters .