code: def on_finalized_text(self, text: str, stream_end: bool = False):
      self.words_predicted_answer += [text]
      self.loop.create_task(self.push_to_chat())
  
imports: import asyncio
  import gc
  import logging
  import os
  import threading
  from typing import Any, Callable, Dict, List, Optional
  import numpy
  import torch
  from accelerate import dispatch_model, infer_auto_device_map
  from accelerate.utils import get_balanced_memory
  from h2o_wave import Q
  from h2o_wave import data
  from h2o_wave import ui
  from transformers import AutoTokenizer, TextStreamer
  from llm_studio.app_utils.utils import get_experiments, get_ui_elements, parse_ui_elements, set_env
  from llm_studio.python_configs.base import DefaultConfigProblemBase
  from llm_studio.src.datasets.text_utils import get_tokenizer
  from llm_studio.src.models.text_causal_language_modeling_model import Model
  from llm_studio.src.utils.config_utils import NON_GENERATION_PROBLEM_TYPES, load_config_yaml
  from llm_studio.src.utils.modeling_utils import load_checkpoint
label_desc: Use image node_id 2 for calling the WaveChatStreamer obj's underlying member method code with example usage: obj.on_finalized_text(text, stream_end) without return types