code: def do_sort(
      sample,
      orig_idx_to_sort_idx,
  ):
      sample["mentions"] = sort_mentions(
          sample["mentions"], orig_idx_to_sort_idx
      )
      sample["label_id"] = sort_mentions(
          sample["label_id"], orig_idx_to_sort_idx
      )
      sample["wikidata_id"] = sort_mentions(
          sample["wikidata_id"], orig_idx_to_sort_idx
      )
      sample["entity"] = sort_mentions(
          sample["entity"], orig_idx_to_sort_idx
      )
      sample["label"] = sort_mentions(
          sample["label"], orig_idx_to_sort_idx
      )
  
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 6 for calling a global function with example usage: do_sort(sample, orig_idx_to_sort_idx) without return types