<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sevenths(key):
 """Return all the sevenths chords in key in a list."""

    if _sevenths_cache.has_key(key):
        return _sevenths_cache[key]
    res = map(lambda x: seventh(x, key), keys.get_notes(key))
    _sevenths_cache[key] = res
    return res