code: def acquire(self, permits=1):
          
          check_not_negative(permits, "Permits cannot be negative!")
          return self._encode_invoke(semaphore_acquire_codec, permits=permits)
docs: Acquires one or specified amount of permits if available, and returns immediately, reducing the number of
          available permits by one or given amount.
  
          If insufficient permits are available then the current thread becomes disabled for thread scheduling purposes
          and lies dormant until one of following happens:
  
              * some other thread invokes one of the release methods for this semaphore, the current thread is next to be
              assigned permits and the number of available permits satisfies this request,
              * this Semaphore instance is destroyed, or
              * some other thread interrupts the current thread.
  
          :param permits: (int), the number of permits to acquire (optional).