Releases one or given number of permits, increasing the number of available permits by one or that amount.

        There is no requirement that a thread that releases a permit must have acquired that permit by calling one of
        the acquire methods. Correct usage of a semaphore is established by programming convention in the application.

        :param permits: (int), the number of permits to release (optional).

def release(self, permits=1):
        """
        Releases one or given number of permits, increasing the number of available permits by one or that amount.

        There is no requirement that a thread that releases a permit must have acquired that permit by calling one of
        the acquire methods. Correct usage of a semaphore is established by programming convention in the application.

        :param permits: (int), the number of permits to release (optional).
        """
        check_not_negative(permits, "Permits cannot be negative!")
        return self._encode_invoke(semaphore_release_codec, permits=permits)