<commit_before>status :draft
# Q1
multiple_choice :have_you_adopted_the_child? do
  option :yes => :no_registration_result 
  option :no => :who_has_british_nationality? 
end
# Q2
multiple_choice :who_has_british_nationality? do
  option :mother => :country_of_birth?
  option :father => :country_of_birth?
  option :mother_and_father => :country_of_birth?
  option :neither => :no_registration_result

  save_input_as :british_national_parent

end
# Q3
country_select :country_of_birth? do
  save_input_as :country_of_birth

  next_node do |response|
    if response == 'australia' # TODO Registrations data to be used here.
      :commonwealth_result
    else
      :married_couple_or_civil_partnership?<commit_msg>Use registrations data<commit_after>status :draft

reg_data_query = SmartAnswer::Calculators::RegistrationsDataQuery.new

# Q1
multiple_choice :have_you_adopted_the_child? do
  option :yes => :no_registration_result 
  option :no => :who_has_british_nationality? 
end
# Q2
multiple_choice :who_has_british_nationality? do
  option :mother => :country_of_birth?
  option :father => :country_of_birth?
  option :mother_and_father => :country_of_birth?
  option :neither => :no_registration_result

  save_input_as :british_national_parent

end
# Q3
country_select :country_of_birth? do
  save_input_as :country_of_birth

  next_node do |response|
    if reg_data_query.commonwealth_country?(response)
      :commonwealth_result
    else
      :married_couple_or_civil_partnership?
{'fraction_non_alphanumeric': 0.07491638795986622, 'fraction_numerical': 0.004013377926421404, 'mean_word_length': 5.9581395348837205, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7633296', 'n_tokens_mistral': 537, 'n_tokens_neox': 507, 'n_words': 103}