'Submit a verification attempt.
Arguments:
user (User): The user making the attempt.
face_image (str): Decoded face image data.
Keyword Arguments:
photo_id_image (str or None): Decoded photo ID image data.
initial_verification (SoftwareSecurePhotoVerification): The initial verification attempt.'

def _submit_attempt(self, user, face_image, photo_id_image=None, initial_verification=None):

    attempt = SoftwareSecurePhotoVerification(user=user)
    attempt.upload_face_image(face_image)
    if (photo_id_image is not None):
        attempt.upload_photo_id_image(photo_id_image)
    elif (initial_verification is None):
        log.error('Neither    a    photo    ID    image    or    initial    verification    attempt    provided.    Parameter    validation    in    the    view    should    prevent    this    from    happening!')
    attempt.mark_ready()
    attempt.submit(copy_id_photo_from=initial_verification)
    return attempt
