<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def email_queue():
 """Checks for emails, that fill up the queue without getting sent."""

    status = SERVER_STATUS['OK']
    count = Message.objects.exclude(priority=PRIORITY_DEFERRED).filter(
        when_added__lte=now() - timedelta(minutes=QUEUE_TIMEOUT)).count()

    if QUEUE_WARNING_THRESHOLD <= count < QUEUE_DANGER_THRESHOLD:
        status = SERVER_STATUS['WARNING']
    if count >= QUEUE_DANGER_THRESHOLD:
        status = SERVER_STATUS['DANGER']

    return {
        'label': 'Queued Email',
        'status': status,
        'info': 'There are currently {0} messages in the mail queue.'.format(
            count)
    }