function _transformForAsyncIterator(doc) {
  return doc == null ? { done: true } : { value: doc, done: false };
}
Returns an asyncIterator for use with [`for/await/of` loops](https://thecodebarbarian.com/getting-started-with-async-iterators-in-node-js)
You do not need to call this function explicitly, the JavaScript runtime
will call it for you.

#### Example:

    // Async iterator without explicitly calling `cursor()`. Mongoose still
    // creates an AggregationCursor instance internally.
    const agg = Model.aggregate([{ $match: { age: { $gte: 25 } } }]);
    for await (const doc of agg) {
      console.log(doc.name);
    }

    // You can also use an AggregationCursor instance for async iteration
    const cursor = Model.aggregate([{ $match: { age: { $gte: 25 } } }]).cursor();
    for await (const doc of cursor) {
      console.log(doc.name);
    }

Node.js 10.x supports async iterators natively without any flags. You can
enable async iterators in Node.js 8.x using the [`--harmony_async_iteration` flag](https://github.com/tc39/proposal-async-iteration/issues/117#issuecomment-346695187).

**Note:** This function is not set if `Symbol.asyncIterator` is undefined. If
`Symbol.asyncIterator` is undefined, that means your Node.js version does not
support async iterators.

@method [Symbol.asyncIterator]
@memberOf AggregationCursor
@instance
@api public