def METHOD_NAME(request_log, user_id):
    attempts = request_log.processingattempt_set.filter(xform_id__isnull=False)
    for attempt in attempts:
        form = get_form_or_404(request_log.domain, attempt.xform_id)
        form.archive(user_id=user_id)
    _revert_api_request_log(request_log)