code: def get_tokenizer(model_name, special_tokens):
      pretrained_path = get_pretrained_path(model_name)
      # Context for legacy=True: https://github.com/huggingface/transformers/issues/25176
      tokenizer = AutoTokenizer.from_pretrained(
          pretrained_path, legacy=True
      )
      tokenizer.pad_token = tokenizer.eos_token
      tokenizer.add_tokens(special_tokens, special_tokens=True)
  
      return tokenizer
  
imports: import argparse
  from filelock import FileLock
  import functools
  import json
  import math
  import os
  from pathlib import Path
  import re
  import tempfile
  import time
  import tree
  from typing import Tuple
  from accelerate import Accelerator, DeepSpeedPlugin
  from accelerate.utils import DummyOptim, DummyScheduler, set_seed
  import torch
  import torch.nn
  import tqdm
  from transformers import AutoModelForCausalLM, AutoTokenizer, get_linear_schedule_with_warmup
  from peft import LoraConfig, get_peft_model
  import ray
  from ray import train
  import ray.util.scheduling_strategies
  from ray.train.torch import TorchTrainer
  from ray.train import Checkpoint
  from utils import get_checkpoint_and_refs_dir, get_mirror_link, download_model, get_download_path
label_desc: Use image node_id 5 for calling a global function with example usage: get_tokenizer(model_name, special_tokens) and returns: tokenizer