def get(self, name):
        """Gets (or creates) a semaphore with a given name.

        :param name: The semaphore name to get/create (used to associate
                     previously created names with the same semaphore).

        Returns an newly constructed semaphore (or an existing one if it was
        already created for the given name).
        """
        with self._lock:
            try:
                return self._semaphores[name]
            except __HOLE__:
                sem = threading.Semaphore()
                self._semaphores[name] = sem
                return sem
dataset/ETHPy150Open openstack/oslo.concurrency/oslo_concurrency/lockutils.py/Semaphores.get