<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def formvalue (form, key):
 """Get value with given key from WSGI form."""

    field = form.get(key)
    if isinstance(field, list):
        field = field[0]
    return field