code: def sentence_mentions_pairs(sentences, mentions):
      mentions_per_sent = {}
  
      for m in mentions:
          sent_idx = int(m["sent_idx"])
  
          curr_ments = mentions_per_sent.get(sent_idx, [])
          curr_ments.append(m)
  
          mentions_per_sent[sent_idx] = curr_ments
  
      pairs = []
  
      for idx, sent in enumerate(sentences):
          pairs.append((sent, mentions_per_sent.get(idx, [])))
  
      return pairs
  
file_path: BLINK/blink/utils.py
imports: import io
  import json
  import os
  import pickle
  from segtok.segmenter import split_multi
label_desc: Use image node_id 4 for calling a global function with example usage: sentence_mentions_pairs(sentences, mentions) and returns: pairs