private function isInTransaction(array $options)
    {
        if (isset($options['session']) && $options['session'] instanceof \MongoDB\Driver\Session && $options['session']->isInTransaction()) {
            return true;
        }
        return false;
    }