function wrapExport(nodule, spec) {
  if (nodule[symbols.nrEsmProxy] === true) {
    // A CJS module has been imported as ESM through import-in-the-middle. This
    // means that `nodule` is set to an instance of our proxy. What we actually
    // want is the thing to be instrumented. We assume it is the "default"
    // export.
    nodule = nodule.default
  }
  this._toExport = this.wrap(nodule, null, spec)
  return this._toExport
}
Wraps the actual module being instrumented to change what `require` returns.

- `wrapExport(nodule, spec)`

@memberof Shim.prototype
@param {*} nodule
 The original export to replace with our new one.
@param {WrapFunction} spec
 A wrapper function. The return value from this spec is what will replace
 the export.
@returns {*} The return value from `spec`.