import configparser


def load_parameters(parameters_filepath):
    """
    load parameters from an *.ini file
    :param parameters_filepath: filename (absolute path)
    :return: nested dictionary of parameters
    """
    conf_parameters = configparser.ConfigParser()
    conf_parameters.read(parameters_filepath, encoding="UTF-8")
    # nested_parameters = utils.convert_configparser_to_dictionary(conf_parameters)
    nested_parameters = {s: dict(conf_parameters.items(s)) for s in conf_parameters.sections()}
    return nested_parameters