'Returns dictionary having values for rendering template'

def prepare_result_dict(self, survey, current_filters=None):

    current_filters = (current_filters if current_filters else [])
    Survey = request.env['survey.survey']
    result = {'page_ids': []}
    for page in survey.page_ids:
        page_dict = {'page': page, 'question_ids': []}
        for question in page.question_ids:
            question_dict = {'question': question, 'input_summary': Survey.get_input_summary(question, current_filters), 'prepare_result': Survey.prepare_result(question, current_filters), 'graph_data': self.get_graph_data(question, current_filters)}
            page_dict['question_ids'].append(question_dict)
        result['page_ids'].append(page_dict)
    return result
