def METHOD_NAME(input_case, file, keep_punct_add_end: bool = False):
    whitelist = load_labels(file)
    if input_case == "lower_cased":
        whitelist = [[x.lower(), y] for x, y in whitelist]
    else:
        whitelist = [[x, y] for x, y in whitelist]
    if keep_punct_add_end:
        whitelist.extend(augment_labels_with_punct_at_end(whitelist))
    graph = pynini.string_map(whitelist)
    return graph