import unicodedata


def remove_diacritic(Enum):
    """
    Given an Enum of Unicode diacritics, return a function that takes a
    string and returns the string without those diacritics.
    """
    diacritics = Enum.strings()

    def _(text):
        return unicodedata.normalize("NFC", "".join(
            ch
            for ch in unicodedata.normalize("NFD", text)
            if ch not in diacritics)
        )
    return _