<s> import os <EOL> from flask import Blueprint , render_template , flash , request , redirect , url_for <EOL> import next . constants as constants <EOL> from next . api . keychain import KeyChain <EOL> from next . api . resource_manager import ResourceManager <EOL> resource_manager = ResourceManager ( ) <EOL> keychain = KeyChain ( ) <EOL> query_page = Blueprint ( '<STR_LIT>' , <EOL> __name__ , <EOL> template_folder = '<STR_LIT>' , <EOL> static_folder = '<STR_LIT>' ) <EOL> @ query_page . route ( '<STR_LIT>' ) <EOL> @ query_page . route ( '<STR_LIT>' ) <EOL> def load_page ( page , exp_uid = None , widget_key = None ) : <EOL> experiment = resource_manager . get_experiment ( exp_uid ) <EOL> num_tries = experiment [ '<STR_LIT>' ] <EOL> app_template = page + '<STR_LIT>' <EOL> if constants . NEXT_BACKEND_GLOBAL_HOST : <EOL> host_url = '<STR_LIT>' . format ( constants . NEXT_BACKEND_GLOBAL_HOST , <EOL> constants . NEXT_BACKEND_GLOBAL_PORT ) <EOL> else : <EOL> host_url = '<STR_LIT>' <EOL> return render_template ( app_template , host_url = host_url , exp_uid = exp_uid , <EOL> widget_key = widget_key , num_tries = num_tries ) , <NUM_LIT:200> , { '<STR_LIT>' : '<STR_LIT>' } </s>
