def update(self, present_kvs: list[OrtValue]):
        """Update the cache with the present key-value tensors.

        Expects the present key-value tensors to be the same as the cache tensors.
        There is no padding in between the key-value tensors. For each element in the batch, the key-value tensors
        are inserted right after the previous key-value tensors. In case of uneven sequence lengths, the key-value
        tensors at each step will be ragged with right padding.

        :param present_kvs: List of present key-value tensors as OrtValue.
        """
        for k, v in zip(self.past_names, present_kvs):
            assert self.cache[k].data_ptr() == v.data_ptr(), "cache ortvalue should be same as present ortvalue"
Update the cache with the present key-value tensors.

        Expects the present key-value tensors to be the same as the cache tensors.
        There is no padding in between the key-value tensors. For each element in the batch, the key-value tensors
        are inserted right after the previous key-value tensors. In case of uneven sequence lengths, the key-value
        tensors at each step will be ragged with right padding.

        :param present_kvs: List of present key-value tensors as OrtValue.
        
examples/utils/kv_cache_utils.py