<commit_before>module SmartAnswer
  class HelpIfYouAreArrestedAbroadFlow < Flow
    def define
      content_id "cb62c931-a0fa-4363-b33d-12ac06d6232a"
      name 'help-if-you-are-arrested-abroad'
      status :published
      satisfies_need "100220"

      arrested_calc = SmartAnswer::Calculators::ArrestedAbroad.new
      prisoner_packs = arrested_calc.data
      exclude_countries = %w(holy-see british-antarctic-territory)

      #Q1
      country_select :which_country?, exclude_countries: exclude_countries do
        save_input_as :country

        calculate :location do
          loc = WorldLocation.find(country)
          raise InvalidResponse unless loc
          loc
        end

        calculate :organisation do
          location.fco_organisation
        end

        calculate :country_name do
          location.name
        end

        calculate :pdf do
          arrested_calc.generate_url_for_download(country, "pdf", "Prisoner pack for #{country_name}")
        end<commit_msg>Now insert `use_erb_templates_for_questions` at top of flow<commit_after>module SmartAnswer
  class HelpIfYouAreArrestedAbroadFlow < Flow
    def define
      content_id "cb62c931-a0fa-4363-b33d-12ac06d6232a"
      name 'help-if-you-are-arrested-abroad'
      status :published
      satisfies_need "100220"

      use_erb_templates_for_questions

      arrested_calc = SmartAnswer::Calculators::ArrestedAbroad.new
      prisoner_packs = arrested_calc.data
      exclude_countries = %w(holy-see british-antarctic-territory)

      #Q1
      country_select :which_country?, exclude_countries: exclude_countries do
        save_input_as :country

        calculate :location do
          loc = WorldLocation.find(country)
          raise InvalidResponse unless loc
          loc
        end

        calculate :organisation do
          location.fco_organisation
        end

        calculate :country_name do
          location.name
        end

        calculate :pdf do
          arrested_calc.generate_url_for_download(country, "pdf", "Prisoner pack for #{country_name}")
        end
{'fraction_non_alphanumeric': 0.061332055582175374, 'fraction_numerical': 0.025874460948730235, 'mean_word_length': 2.6187175043327557, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '11634', 'n_tokens_mistral': 653, 'n_tokens_neox': 623, 'n_words': 128}