code: def initialize(self, ctx):
      super().initialize(ctx)
  
      ctx.cache = {}
  
      logger.info(f"Initialized {self.__class__}")
  
      # Initialize model
      self.tokenizer = AutoTokenizer.from_pretrained(
          ctx.model_yaml_config["handler"]["modelId"]
      )
      self.tokenizer.pad_token_id = self.tokenizer.eos_token_id
      self.model = AutoModelForCausalLM.from_pretrained(
          ctx.model_yaml_config["handler"]["modelId"]
      )
      if torch.cuda.is_available():
          self.model.to("cuda")
      self.model.eval()
  
      # Replace _update_model_kwargs_for_generation of model with a method that extracts the kv cache for us
      old_update = self.model._update_model_kwargs_for_generation
      ctx.kv_cache = {}
  
      def extract_past_key_values_func(self, *args, **kwargs):
          ctx.kv_cache["past_key_values"] = args[0]["past_key_values"]
          return old_update(*args, **kwargs)
  
      self.model._update_model_kwargs_for_generation = types.MethodType(
          extract_past_key_values_func, self.model
      )
  
file_path: serve/test/pytest/test_data/streaming/stream_handler.py
imports: import json
  import logging
  import types
  import torch
  from transformers import AutoModelForCausalLM, AutoTokenizer
  from ts.torch_handler.base_handler import BaseHandler
label_desc: Use image node_id 1 for calling the StreamingHandler obj's underlying member method code with example usage: obj.initialize(ctx) and returns: old_update