code: def extend_fp8_kv_cache(k_cache, v_cache, max_length, device):
      batch_size, num_heads, cur_length, head_dim = k_cache.shape
      new_k_cache, new_v_cache = init_fp8_kv_cache(
          batch_size,
          num_heads,
          head_dim,
          cur_length,
          max_length,
          device,
      )
      new_k_cache[:] = k_cache
      new_v_cache[:] = v_cache
      return new_k_cache, new_v_cache
  
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 6 for calling a global function with example usage: extend_fp8_kv_cache(k_cache, v_cache, max_length, device) and returns: new_k_cache,  new_v_cache