the intended logic of transfer-billing process written down in plain text.

for each user:
try:
    start api transaction
    try:
        import user into billing			# -> def importer.import_general_info
    except:
        log exception, add issue to client_issues
        raise	UserMigrationFailed			# will not import any subscriptions when unable to import the user itself
    for each account:
        try:
            try:
                if not staging:
                    remember account as blanked out	# -> def _blank_out_account_info
                    blank out account info
                    if account should be suspended:
                        remember account as suspended	# -> def _suspend_account
                        suspend account
            except:
                log exception, add issue to list

            try:
                import hosting subscription		# -> importer.import_hosting_subscription
	      except:
                log exception, add issue to list
            for each ssl certificate:
                try:
                    import ssl subscription		# -> importer.import_ssl_subscription
                except:
                    log exception, add issue to list
            for each reg. domain:
                try:
                    import domain subscription		# -> importer.import_domain_subscription
                except:
                    log exception, add issue to list
            if there were issues in list:
                add issues to client_report
                raise AccountMigrationFailed
        except Exception as e:
            if type(e) is not AccountMigrationFailed:
                log exception, add message to client_report
            if account is remembered as suspended:	# -> def _was_account_suspended
                resume account				# -> def _resume_account
                forget account as suspended
            if account is remembered as blanked out:	# -> def _was_account_info_blanked_out
                restore account info			# -> def _restore_account_info
                forget account as blanked out
    if test mode or there are issues in client_report
        raise UserMigrationFailed
    commit api transaction
except Exception as e:
    if type(e) is not UserMigrationFailed:
        log exception, add message to client_report
    roll back api transaction
    for each remembered account:
        resume account
        forget account as suspended
    for each account remembered as blanked out:
        restore account info
        forget account as blanked out
