async function _loadUserApp(appRoot, moduleRoot, module) {
  if (!NoGlobalAwsLambda) {
    globalThis.awslambda = {
      HttpResponseStream,
      streamifyResponse: (handler, options) => {
        // eslint-disable-next-line no-param-reassign
        handler[HANDLER_STREAMING] = STREAM_RESPONSE
        if (typeof options?.highWaterMark === "number") {
          // eslint-disable-next-line no-param-reassign
          handler[HANDLER_HIGHWATERMARK] = Number.parseInt(
            options.highWaterMark,
            10,
          )
        }
        return handler
      },
    }
  }

  try {
    return await _tryRequire(appRoot, moduleRoot, module)
  } catch (e) {
    if (e instanceof SyntaxError) {
      throw new UserCodeSyntaxError(e)
    } else if (e.code !== undefined && e.code === "MODULE_NOT_FOUND") {
      verbose("globalPaths", JSON.stringify(require("node:module").globalPaths))
      throw new ImportModuleError(e)
    } else {
      throw e
    }
  }
}
Load the user's application or throw a descriptive error.
@throws Runtime errors in two cases
  1 - UserCodeSyntaxError if there's a syntax error while loading the module
  2 - ImportModuleError if the module cannot be found