def get_top_state_rule_answers_multi(exploration_state_list, rule_str_list):
 answer_log_list = stats_domain.StateRuleAnswerLog.get_multi_by_multi_explorations(exploration_state_list, rule_str_list)
 return [[{'value': top_answer[0], 'count': top_answer[1]} for top_answer in answer_log.get_all_top_answers()] for answer_log in answer_log_list]

def get_top_state_rule_answers_multi ( exploration_state_list , rule_str_list ) : answer_log_list = stats_domain . StateRuleAnswerLog . get_multi_by_multi_explorations ( exploration_state_list , rule_str_list ) return [ [ { 'value' : top_answer [ 0 ] , 'count' : top_answer [ 1 ] } for top_answer in answer_log . get_all_top_answers ( ) ] for answer_log in answer_log_list ]
returns a list of top answers submitted to the given explorations and states which were mapped to any of the rules listed in rule_str_list for each exploration id and state name tuple in exploration_state_list .