async function initialize(
        userAppCodeName,                // This represents the User App that is running. Could be a Network Node App, a Social Trading App, a Task Server App, etc.
        p2pNetworkClientIdentity,       // Here we will set the Network Client Identity after we load all User Profiles and find the one that is running this App. 
        pullUserProfiles,               // This is used to know if we need to git pull all User Profiles to keep this App uptodate with changes made by users of their User Profiles over tiem. Usually this is only needed at Network Nodes.
        loadAllUserProfileBalances      // At some Apps, there is no need to load and keep up to date all User Profile Balances. Only when this is true we will do that, otherwise we will only load the balance of the User Profile running this app. 
    ) {
        userBalancePersistence = await SA.projects.localStorage.globals.persistence.newPersistenceStore(global.env.DATABASE.TYPE, global.env.DATABASE.USERS_TABLE)
        userBalancePersistence.initialize()
        thisObject.pullUserProfiles = pullUserProfiles
        thisObject.userAppCodeName = userAppCodeName
        thisObject.p2pNetworkClientIdentity = p2pNetworkClientIdentity
        thisObject.loadAllUserProfileBalances = loadAllUserProfileBalances
        await run()
        if (thisObject.pullUserProfiles === true) {
            // This wants to be moved to a new process so it can operated on a different thread.
            // then an interval can be used to updated the profile balances from the persisted store

            const path = global.env.BASE_PATH + '/NetworkProfileManager.js'
            const taskArgs = []
            if(process.env.PROFILE_NAME !== undefined) {
                taskArgs.push('PROFILE_NAME=' + process.env.PROFILE_NAME)
            }
            if(global.env.LOG_LEVEL !== undefined) {
                taskArgs.push('logLevel=' + global.env.LOG_LEVEL)
            }
            setInterval(() => {
                if(currentChildProcess !== undefined && currentChildProcess.connected) {
                    currentChildProcess.disconnect();
                }
                currentChildProcess = SA.nodeModules.childProcess.fork(path, taskArgs, { stdio: 'inherit' })
                currentChildProcess.on('message', (message) => {
                    if(message == 'update') {
                        thisObject.pullUserProfiles = false
                        thisObject.reloadFromStorage = true
                        run()
                    }
                })
            }, 60000 * MINUTES_TO_UPDATE_USER_PROFILES_AND_BALANCES)
            SA.logger.info('Updates of all in-memory User Profiles scheduled to run every ' + MINUTES_TO_UPDATE_USER_PROFILES_AND_BALANCES + ' minutes.')
            SA.logger.info('')
        }
    }
@type {import('../../../Local-Storage/SA/Globals/Persistence').NetworkPersistenceModel}