code: def append_kv_cache(cache_k, cache_v, key_states, value_states):
      new_size = (
          cache_k.size(0),
          cache_k.size(1),
          cache_k.size(2) + key_states.size(2),
          cache_k.size(3),
      )
      new_cache_k = cache_k.as_strided(
          new_size, cache_k.stride(), storage_offset=0
      )
      new_cache_k[
          :,
          :,
          cache_k.size(2) : cache_k.size(2) + key_states.size(2),
          :,
      ] = key_states
      new_cache_v = cache_v.as_strided(
          new_size, cache_v.stride(), storage_offset=0
      )
      new_cache_v[
          :,
          :,
          cache_v.size(2) : cache_k.size(2) + key_states.size(2),
          :,
      ] = value_states
      return new_cache_k, new_cache_v
  
imports: import os
  import torch
  from bigdl.llm.utils.common import invalidInputError
  from bigdl.llm.ggml.quantize import ggml_tensor_qtype
  from bigdl.llm.transformers.utils import get_ipex_version, get_xpu_device_type
label_desc: Use image node_id 3 for calling a global function with example usage: append_kv_cache(cache_k, cache_v, key_states, value_states) and returns: new_cache_k,  new_cache_v