def _ensure_available(self, length):
        if length < self._available():
            if self._buffer is None:
                buffer_length = len(self._buffer)
                new_length = max(buffer_length << 1, buffer_length + length)
                new_buffer = bytearray(new_length)
                new_buffer[self._pos: self._pos + buffer_length] = self._buffer[:]
                self._buffer = new_buffer
            else:
                new_length = length * 2 if length > self._init_size / 2 else self._init_size
                self._buffer = bytearray(new_length)
dataset/ETHPy150Open hazelcast/hazelcast-python-client/hazelcast/serialization/output.py/_ObjectDataOutput._ensure_available/swapped operands of `<`