code: def _set_special_token(self, typ: str, tid: Any) -> None:
      if not isinstance(tid, int):
          return
      if tid < 0:
          raise ValueError(
              f"invalid value for special token type {typ}: {tid}"
          )
      if self.n_vocab is None or tid < self.n_vocab:
          if typ in self.special_token_ids:
              return
          self.special_token_ids[typ] = tid
          return
      print(
          f"gguf: WARNING: Special token type {typ}, id {tid} out of range, must be under {self.n_vocab} - skipping",
          file=sys.stderr,
      )
  
file_path: llama.cpp/gguf-py/gguf/vocab.py
imports: from __future__ import annotations
  import json
  import os
  import sys
  from pathlib import Path
  from typing import Any, Callable
  from .gguf_writer import GGUFWriter
label_desc: Use image node_id 6 for calling the SpecialVocab obj's underlying member method code with example usage: obj._set_special_token(typ, tid) without return types