def drain_permits(self):
    '\n        Acquires and returns all permits that are immediately available.\n\n        :return: (int), the number of permits drained.\n        '
    return self._encode_invoke(semaphore_drain_permits_codec)
Acquires and returns all permits that are immediately available.

:return: (int), the number of permits drained.
def drain_permits(self):
    '\n        Acquires and returns all permits that are immediately available.\n\n        :return: (int), the number of permits drained.\n        '
    return self._encode_invoke(semaphore_drain_permits_codec)