human
Complete this python program:
def _progress():
assistant
#Here is the Python code you requested.

    """Returns unreviewed apps progress.
    Return the number of apps still unreviewed for a given period of time and
    the percentage.
    """
    queues_helper = ReviewersQueuesHelper()
    base_filters = {'pending': (queues_helper.get_pending_queue(), 'nomination'), 'homescreen': (queues_helper.get_homescreen_queue(), 'nomination'), 'rereview': (queues_helper.get_rereview_queue(), 'created'), 'escalated': (queues_helper.get_escalated_queue(), 'created'), 'updates': (queues_helper.get_updates_queue(), 'nomination')}
    operators_and_values = {'new': ('gt', days_ago(5)), 'med': ('range', (days_ago(10), days_ago(5))), 'old': ('lt', days_ago(10)), 'week': ('gte', days_ago(7))}
    types = base_filters.keys()
    progress = {}
    for t in types:
        tmp = {}
        (base_query, field) = base_filters[t]
        for k in operators_and_values.keys():
            (operator, value) = operators_and_values[k]
            filter_ = {}
            filter_[('%s__%s' % (field, operator))] = value
            tmp[k] = base_query.filter(**filter_).count()
        progress[t] = tmp
    def pct(p, t):
        return (((p / float(t)) * 100) if (p > 0) else 0)
    percentage = {}
    for t in types:
        total = ((progress[t]['new'] + progress[t]['med']) + progress[t]['old'])
        percentage[t] = {}
        for duration in ('new', 'med', 'old'):
            percentage[t][duration] = pct(progress[t][duration], total)
    return (progress, percentage)