code: def sort_mentions(
      lst,
      sort_map=None,
  ):
      """
      sort_map: {orig_idx: idx in new "sorted" array}
      """
      new_lst = [0 for _ in range(len(lst))]
      for i in range(len(lst)):
          new_lst[sort_map[i]] = lst[i]
      return new_lst
  
file_path: BLINK/elq/biencoder/data_process.py
imports: import os
  import json
  import logging
  import torch
  from tqdm import tqdm, trange
  from torch.utils.data import DataLoader, TensorDataset
  from pytorch_transformers.tokenization_bert import BertTokenizer
  from blink.biencoder.zeshel_utils import world_to_id
  from elq.common.params import ENT_START_TAG, ENT_END_TAG, ENT_TITLE_TAG
label_desc: Use image node_id 5 for calling a global function with example usage: sort_mentions(lst, sort_map) and returns: new_lst