<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def list_encoder(values, instance, field: Field):
 """Encodes an iterable of a given field into a database-compatible format."""

    return [field.to_db_value(element, instance) for element in values]