human
Complete the below
def enum_choice_list(data):

    ''''Creates the argparse choices and type kwargs for a supplied enum type or list of strings.'
    '''
assistant
#Here is the Python code you requested.
    if (not data):
        return {}
    try:
        choices = [x.value for x in data]
    except AttributeError:
        choices = data
    def _type(value):
        return (next((x for x in choices if (x.lower() == value.lower())), value) if value else value)
    params = {'choices': CaseInsensitiveList(choices), 'type': _type}
    return params