function assertSetupCompleted(status) {
    return async function checkPermission(__) {
        const isSetup = await checkIsSetup();

        if (isSetup === status) {
            return __;
        }

        const completed = tpl(messages.setupAlreadyCompleted);
        const notCompleted = tpl(messages.setupMustBeCompleted);

        function throwReason(reason) {
            throw new errors.NoPermissionError({message: reason});
        }

        if (isSetup) {
            throwReason(completed);
        } else {
            throwReason(notCompleted);
        }
    };
}
Allows an assertion to be made about setup status.

@param  {Boolean} status True: setup must be complete. False: setup must not be complete.
@return {Function} returns a "task ready" function