docs: async function setup(studySetup) {
            // 0.  testing overrides, if any
            if (!studySetup.testing) {
              studySetup.testing = {};
            }
  
            // Setup and sets the variation / _internals
            // includes possible 'firstRun' handling.
            await studyUtils.setup(studySetup);
  
            // current studyInfo.
            let studyInfo = studyUtils.info();
  
            // Check if the user is eligible to run this study using the |isEligible|
            // function when the study is initialized
            if (studyInfo.isFirstRun) {
              if (!studySetup.allowEnroll) {
                utilsLogger.debug("User is ineligible, ending study.");
                // 1. uses studySetup.endings.ineligible.url if any,
                // 2. sends UT for "ineligible"
                // 3. then uninstalls add-on
                await endStudy("ineligible");
                return studyUtils.info();
              }
            }
  
            if (studyInfo.delayInMinutes === 0) {
              utilsLogger.debug("encountered already expired study");
              await endStudy("expired");
              return studyUtils.info();
            }
  
            /*
            * Adds the study to the active list of telemetry experiments,
            * and sends the "installed" telemetry ping if applicable,
            * if it's a firstRun
            */
            await studyUtils.startup();
  
            // update what the study variation and other info is.
            studyInfo = studyUtils.info();
            utilsLogger.debug(`api info: ${JSON.stringify(studyInfo)}`);
            try {
              studyApiEventEmitter.emitReady(studyInfo);
            } catch (e) {
              utilsLogger.error("browser.study.setup error");
              utilsLogger.error(e);
            }
            return studyUtils.info();
          }