You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gpo_verify_form.rb
    path of file: ./repos/identity-idp/app/forms
    
    the code of the file until where you have to start completion: class GpoVeri
    
  def submit
    result = valid?
    fraud_check_failed = pending_profile&.fraud_pending_reason.present?

    if result
      pending_profile&.remove_gpo_deactivation_reason

      if user.has_establishing_in_person_enrollment_safe?
        schedule_in_person_enrollment_and_deactivate_profile
      elsif fraud_check_failed && threatmetrix_enabled?
        pending_profile&.deactivate_for_fraud_review
      elsif fraud_check_failed
        pending_profile&.activate_after_fraud_review_unnecessary
      else
        activate_profile
      end