static serializeDeps(deps) {
    deps = [pageFunctions.esbuildFunctionWrapperString, ...deps || []];
    return deps.map(dep => {
      if (typeof dep === 'function') {
        // esbuild will change the actual function name (ie. function actualName() {})
        // always, and preserve the real name in `actualName.name`.
        // See esbuildFunctionWrapperString.
        const output = dep.toString();
        const runtimeName = pageFunctions.getRuntimeFunctionName(dep);
        if (runtimeName !== dep.name) {
          // In addition to exposing the mangled name, also expose the original as an alias.
          return `${output}; const ${dep.name} = ${runtimeName};`;
        } else {
          return output;
        }
      } else {
        return dep;
      }
    }).join('\n');
  }
Serializes an array of functions or strings.

Also makes sure that an esbuild-bundled version of Lighthouse will
continue to create working code to be executed within the browser.
@param {Array<Function|string>=} deps
@return {string}