code: def set_stop_token_ids(cfg, tokenizer):
      cfg.tokenizer._stop_words = list(
          filter(None, cfg.prediction.stop_tokens.split(","))
      )
      for stop_word in [
          cfg.dataset.text_system_start,
          cfg.dataset.text_prompt_start,
          cfg.dataset.text_answer_separator,
      ]:
          stop_word = codecs.decode(stop_word, "unicode_escape").strip()
          if (
              stop_word != ""
              and cfg.tokenizer.add_prompt_answer_tokens
              and (stop_word not in tokenizer.get_vocab())
          ):
              tokenizer.add_tokens([stop_word])
          cfg.tokenizer._stop_words.append(stop_word)
      cfg.tokenizer._stop_words = [
          stop_word
          for stop_word in cfg.tokenizer._stop_words
          if stop_word != ""
      ]
      cfg.tokenizer._stop_words_ids = []
      for stop_word in set(cfg.tokenizer._stop_words):
          cfg.tokenizer._stop_words_ids.append(
              tokenizer(
                  stop_word,
                  return_tensors="pt",
                  add_special_tokens=False,
              )["input_ids"][0]
          )
      if cfg.environment._local_rank == 0:
          logger.info(
              f"Stop token ids: {cfg.tokenizer._stop_words_ids}"
          )
  
imports: import codecs
  import logging
  import os
  from typing import Any
  from transformers import AutoTokenizer
label_desc: Use image node_id 3 for calling a global function with example usage: set_stop_token_ids(cfg, tokenizer) without return types