<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getfields(comm):
 """get all the fields that have the key 'field' """

    fields = []
    for field in comm:
        if 'field' in field:
            fields.append(field)
    return fields