<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def deferred_emails():
 """Checks for deferred email, that otherwise fill up the queue."""

    status = SERVER_STATUS['OK']
    count = Message.objects.deferred().count()

    if DEFERRED_WARNING_THRESHOLD <= count < DEFERRED_DANGER_THRESHOLD:
        status = SERVER_STATUS['WARNING']
    if count >= DEFERRED_DANGER_THRESHOLD:
        status = SERVER_STATUS['DANGER']

    return {
        'label': 'Deferred Email',
        'status': status,
        'info': 'There are currently {0} deferred messages.'.format(count)
    }