function createExcludingSyntheticModuleOverheadLoader(
    moduleMgr, modulesToMarkAsLoaded) {
  return {
    syntheticModuleCallbackCalled: false,
    loadModules: function(ids, moduleInfoMap, {onError, onSuccess, onTimeout}) {
      const cb = () => {
        this.syntheticModuleCallbackCalled = true;
      };
      requestCount++;
      setTimeout(() => {
        // Simulate a synthetic module loading first, and registering a cb.
        moduleMgr.registerInitializationCallback(cb);
        for (const id of modulesToMarkAsLoaded) {
          moduleMgr.beforeLoadModuleCode(id);
          moduleMgr.setLoaded();
        }
        if (onSuccess) {
          onSuccess();
        }
      }, 5);
    },
  };
}
Creates an AbstractModuleLoader implementation that registers one
initialization callback for a synthetic module, then simulates loading the
given modules.
@param {!ModuleManager} moduleMgr
@param {!Array} modulesToMarkAsLoaded
@return {{loadModules: function(), syntheticModuleCallbackCalled: boolean}}
@suppress {checkTypes} suppression added to enable type checking