def METHOD_NAME(self):
    user = CouchUser.get_by_user_id(self.user_id)
    reason = "User %s forms archived for domain %s by system" % (user.raw_username, self.domain)
    form_processor_interface = FormProcessorInterface(self.domain)
    with open("cases_rebuilt.txt", "w") as case_log:
        for case_id in with_progress_bar(self.case_ids_to_rebuild):
            case_log.write("%s\n" % case_id)
            rebuild_case_from_forms(self.domain, case_id, RebuildWithReason(reason=reason))
            ledgers = form_processor_interface.ledger_db.get_ledgers_for_case(case_id)
            for ledger in ledgers:
                form_processor_interface.ledger_processor.rebuild_ledger_state(
                    case_id, ledger.section_id, ledger.entry_id)