Part Analytics interview question

Wrap a synchronous function into a promise