code: def get_image_num_map(tokenizer):
      image_num_map = {}
      for key in image_mapping_dict:
          image_num_map[image_mapping_dict[key]] = tokenizer(
              image_mapping_dict[key]
          )["input_ids"][
              1:
          ]  # remove <s>
      image_num_map[DEFAULT_HUMAN_IMAGE_PRETOKEN] = image_num_map[
          DEFAULT_HUMAN_IMAGE_PRETOKEN
      ][
          0
      ]  # convert list to number
      return image_num_map
  
file_path: deepspeedexamples/applications/DeepSpeed-VisualChat/utils/data/DST.py
imports: from typing import Iterable
  import random
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: get_image_num_map(tokenizer) and returns: image_num_map