def load_parameters(self, source):
    'For YML, the source it the file path'
    with open(source, encoding=locale.getpreferredencoding(False)) as parameters_source:
        loaded = yaml.safe_load(parameters_source.read())
        if loaded:
            for (key, value) in loaded.items():
                if isinstance(value, str):
                    loaded[key] = (("'" + value) + "'")
            return loaded
    return {}
For YML, the source it the file path
def load_parameters(self, source):
    
    with open(source, encoding=locale.getpreferredencoding(False)) as parameters_source:
        loaded = yaml.safe_load(parameters_source.read())
        if loaded:
            for (key, value) in loaded.items():
                if isinstance(value, str):
                    loaded[key] = (("'" + value) + "'")
            return loaded
    return {}