def setup_survey_pages(form_model, survey_pages):
    """
    Helper function to set up a list of survey pages with a common form model
    (a dynamically generated survey model class).
    """
    for i, page in enumerate(survey_pages):
        page.setup_survey(form_model, i)
