def load_config(self, config_source, parameters_source):
    'For YML, the source it the file path'
    with open(config_source, encoding=locale.getpreferredencoding(False)) as config_source_file:
        config_raw = config_source_file.read()
        parameters = {}
        if os.path.isfile(parameters_source):
            params = self.load_parameters(parameters_source)
            if (params is not None):
                parameters.update(params)
        env_params = {}
        env_params.update(os.environ)
        for (key, value) in env_params.items():
            if is_string(value):
                env_params[key] = (("'" + value) + "'")
        parameters.update(env_params)
        final_configuration = config_raw.format(**parameters)
        final_configuration = yaml.safe_load(final_configuration)
        return (final_configuration if (final_configuration is not None) else {})
For YML, the source it the file path
def load_config(self, config_source, parameters_source):
    
    with open(config_source, encoding=locale.getpreferredencoding(False)) as config_source_file:
        config_raw = config_source_file.read()
        parameters = {}
        if os.path.isfile(parameters_source):
            params = self.load_parameters(parameters_source)
            if (params is not None):
                parameters.update(params)
        env_params = {}
        env_params.update(os.environ)
        for (key, value) in env_params.items():
            if is_string(value):
                env_params[key] = (("'" + value) + "'")
        parameters.update(env_params)
        final_configuration = config_raw.format(**parameters)
        final_configuration = yaml.safe_load(final_configuration)
        return (final_configuration if (final_configuration is not None) else {})