<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def annotation_has_expired(event, key, timeout):
 """Check if an event error has expired."""

    anns = get_annotations(event, key)
    if anns:
        return (time.time() - anns[0]["ts"]) > timeout
    else:
        return False