def get_level_maker(levels_file):
    levels_list = levels_from_file(levels_file)

    def get_level(value):
        level = 0
        for level_bin in levels_list:
            if (value > level_bin):
                level += 1
            else:
                return level
        return level
    no_of_levels = (len(levels_list) + 1)
    return (get_level, no_of_levels)
def get_level_maker(levels_file):
    levels_list = levels_from_file(levels_file)

    def get_level(value):
        level = 0
        for level_bin in levels_list:
            if (value > level_bin):
                level += 1
            else:
                return level
        return level
    no_of_levels = (len(levels_list) + 1)
    return (get_level, no_of_levels)