Some APIs use error-first callbacks: callback(err, result=None).
Implement promisify(fn) that wraps such a function into one you canawait, using an asyncio.Future — the same idea as Node's util.promisify.
await promisify(fn)(...args) should:
result if the callback is invoked as callback(None, result).callback(err).solve drives your implementation through a series of test cases and
returns whether each resolved or raised.
Sample tests