def __init__(self, value=1):
        if value < 0:
            raise ValueError("semaphore initial value must be >= 0")
        self._cond = threading.Condition(threading.Lock())
        self._value = value
dataset/ETHPy150Open mongodb/mongo-python-driver/pymongo/thread_util.py/Semaphore.__init__/original