def METHOD_NAME(messages):
    errors = {}
    for k, v in messages.items():
        key = camelize(k, uppercase_first_letter=False)
        if isinstance(v, dict):
            errors[key] = METHOD_NAME(v)
        elif isinstance(v, list):
            errors[key] = v[0]
    return errors