code: function awaitFunctionCall() {
                  let func;
                  const promise = new Promise((resolve, reject) => {
                      func = function(...args) {
                          resolve(args);
                          return new Promise((resolve, reject) => {
                              // give us some time to process the result before
                              // continuing
                              global.setTimeout(resolve, 1);
                          });
                      };
                  });
                  return {func, promise};
              }
docs: /* return a promise and a function. When the function is called,
  the promise will be resolved.