def _editor_progress(limited_reviewer=False):
 types = ['nominated', 'pending']
 progress = {'new': queue_counts(types, days_max=4, unlisted=False, admin_reviewer=True, limited_reviewer=limited_reviewer), 'med': queue_counts(types, days_min=5, days_max=10, unlisted=False, admin_reviewer=True, limited_reviewer=limited_reviewer), 'old': queue_counts(types, days_min=11, unlisted=False, admin_reviewer=True, limited_reviewer=limited_reviewer)}
 def pct(p, t):
  return (((p / float(t)) * 100) if (p > 0) else 0)
 percentage = {}
 for t in types:
  total = ((progress['new'][t] + progress['med'][t]) + progress['old'][t])
  percentage[t] = {}
  for duration in ('new', 'med', 'old'):
   percentage[t][duration] = pct(progress[duration][t], total)
 return (progress, percentage)

def _editor_progress ( limited_reviewer = False ) : types = [ 'nominated' , 'pending' ] progress = { 'new' : queue_counts ( types , days_max = 4 , unlisted = False , admin_reviewer = True , limited_reviewer = limited_reviewer ) , 'med' : queue_counts ( types , days_min = 5 , days_max = 10 , unlisted = False , admin_reviewer = True , limited_reviewer = limited_reviewer ) , 'old' : queue_counts ( types , days_min = 11 , unlisted = False , admin_reviewer = True , limited_reviewer = limited_reviewer ) } def pct ( p , t ) : return ( ( ( p / float ( t ) ) * 100 ) if ( p > 0 ) else 0 ) percentage = { } for t in types : total = ( ( progress [ 'new' ] [ t ] + progress [ 'med' ] [ t ] ) + progress [ 'old' ] [ t ] ) percentage [ t ] = { } for duration in ( 'new' , 'med' , 'old' ) : percentage [ t ] [ duration ] = pct ( progress [ duration ] [ t ] , total ) return ( progress , percentage )
return the progress and the percentage .