def _merge_config(self, config, templates):
if not templates:<EOL><INDENT>return config<EOL><DEDENT>if not isinstance(templates, list):<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>result = {}<EOL>config_list = templates + [config]<EOL>for merging in config_list:<EOL><INDENT>result = merge_config(result, self._load(merging), self.list_identifiers)<EOL><DEDENT>return result<EOL>
Merges config with templates