Creates a function that retrieves labels based on given keys from a provided dictionary.
A dictionary where keys are of type T and values are strings representing labels.
A function that takes a key of type T and returns its corresponding label or the key itself if no label is found.
Creates a function that retrieves labels based on given keys from a provided dictionary.