def load(self, paths, params=None):
def replace(match):<EOL><INDENT>"""<STR_LIT>"""<EOL>return params[match.group(<NUM_LIT:0>)]<EOL><DEDENT>params = {r"<STR_LIT>".format(key): val for (key, val)<EOL>in params.iteritems()} if params else {}<EOL>regex = compile("<STR_LIT:|>".join(params) or r"<STR_LIT>")<EOL>for path in paths:<EOL><INDENT>with open(path, "<STR_LIT:r>") as stream:<EOL><INDENT>logger.info("<STR_LIT>".format(path))<EOL>yaml = regex.sub(replace, stream.read())<EOL><DEDENT>try:<EOL><INDENT>self.update(load(yaml))<EOL><DEDENT>except TypeError:  <EOL><INDENT>logger.warn("<STR_LIT>".format(yaml))<EOL><DEDENT><DEDENT>return<EOL>
Load data from configuration files.

        Configuration values are read from a sequence of one or more YAML
        files. Files are read in the given order, and a duplicate value will
        overwrite the existing value.

        The optional 'params' argument is a dict-like object to use for
        parameter substitution in the config files. Any text matching "%key;"
        will be replaced with the value for 'key' in params.