def resolve_answers(exploration_id, state_name, rule_str, answers):
 assert isinstance(answers, list)
 answer_log = StateRuleAnswerLogModel.get_or_create(exploration_id, state_name, rule_str)
 for answer in answers:
  if (answer not in answer_log.answers):
   logging.error(('Answer %s not found in answer log for rule %s of exploration %s, state %s, handler %s' % (answer, rule_str, exploration_id, state_name, _OLD_SUBMIT_HANDLER_NAME)))
  else:
   del answer_log.answers[answer]
 answer_log.put()

def resolve_answers ( exploration_id , state_name , rule_str , answers ) : assert isinstance ( answers , list ) answer_log = StateRuleAnswerLogModel . get_or_create ( exploration_id , state_name , rule_str ) for answer in answers : if ( answer not in answer_log . answers ) : logging . error ( ( 'Answer %s not found in answer log for rule %s of exploration %s, state %s, handler %s' % ( answer , rule_str , exploration_id , state_name , _OLD_SUBMIT_HANDLER_NAME ) ) ) else : del answer_log . answers [ answer ] answer_log . put ( )
resolves selected answers for the given rule .