human
Here's a good function header given the following:
I wrote the below code

    display = field.createDisplay
    if key_func:
        def createDisplay():
            try:
                key = key_func(field.value)
                return enum[key]
            except LookupError:
                return display()
    else:
        def createDisplay():
            try:
                return enum[field.value]
            except LookupError:
                return display()
    field.createDisplay = createDisplay
    field.getEnum = (lambda : enum)
    return field

What's a good function header?
assistant
#Here's a good function header.

def Enum(field, enum, key_func=None):