def load_referenced_json_config(filepath):
    """
    Loads a json file that has "jsonref" style references and resolves the references
    :param string filepath: The path from which to reads the JSON
    :return: dict
    """
    import jsonref
    from copy import deepcopy
    with open(filepath, 'r') as f:
        config = jsonref.load(f)
    config = deepcopy(config)
    return config
