def get_questions_for_taken(self, taken_id):
sections = []<EOL>first_section = self._assessment_bank.get_first_assessment_section(taken_id)<EOL>sections.append(first_section)<EOL>try:<EOL><INDENT>previous_section_id = first_section.ident<EOL>while True:<EOL><INDENT>next_section = self._assessment_bank.get_next_assessment_section(previous_section_id)<EOL>previous_section_id = next_section.ident<EOL>sections.append(next_section)<EOL><DEDENT><DEDENT>except (StopIteration, errors.IllegalState):<EOL><INDENT>final_sections = []<EOL>for section in sections:<EOL><INDENT>new_questions = list(self._assessment_bank.get_questions(section.ident))<EOL>section_map = {<EOL>'<STR_LIT>': new_questions,<EOL>'<STR_LIT>': section.ident<EOL>}<EOL>final_sections.append(section_map)<EOL><DEDENT>return final_sections<EOL><DEDENT>
gets all questions across all sections