<s> def process ( api , data ) : <EOL> pid_map = api . stats . get_pid_categories ( ) <EOL> solved_pids = api . problem . get_solved_pids ( tid = data [ '<STR_LIT>' ] ) <EOL> categories = set ( ) <EOL> for pid in solved_pids : <EOL> categories . add ( pid_map [ pid ] ) <EOL> earned = True <EOL> for cat in api . problem . get_all_categories ( ) : <EOL> if cat not in categories : <EOL> if cat != "<STR_LIT>" : <EOL> earned = False <EOL> break <EOL> return earned , { } </s>
