function group(name, fn) {
    return __awaiter(this, void 0, void 0, function* () {
        startGroup(name);
        let result;
        try {
            result = yield fn();
        }
        finally {
            endGroup();
        }
        return result;
    });
}
Wrap an asynchronous function call in a group.

Returns the same type as the function itself.

@param name The name of the group
@param fn The function to wrap in the group