code: def cached_tokenize(text: str):
      global model, cache, config, generator, tokenizer
      global max_cached_strings, tokenizer_cache
  
      if text in tokenizer_cache:
          return tokenizer_cache[text]
  
      while len(tokenizer_cache) >= max_cached_strings:
          del tokenizer_cache[
              next(iter(tokenizer_cache))
          ]  # Always removes oldest entry as of Python 3.7
  
      new_enc = tokenizer.encode(text)
      tokenizer_cache[text] = new_enc
      return new_enc
  
file_path: exllama/example_ws.py
imports: import asyncio
  import websockets
  import json
  from sentencepiece import SentencePieceProcessor
  from model import ExLlama, ExLlamaCache, ExLlamaConfig
  from lora import ExLlamaLora
  from tokenizer import ExLlamaTokenizer
  from generator import ExLlamaGenerator
  import argparse
  import torch
  import sys
  import os
  import glob
  import model_init
label_desc: Use image node_id 1 for calling a global function with example usage: cached_tokenize(text) and returns: new_enc, tokenizer_cache