code: def get_ids_list(data_list, vocab):
      """
      Function to obtain indices from vocabulary
      """
      ids_list = []
      for line in data_list:
          curr_line_idx = []
          for word in line:
              try:
                  curr_line_idx.append(vocab[word])
              except ValueError:
                  curr_line_idx.append(vocab[UNK])
  
          ids_list.append(curr_line_idx)
      return ids_list
  
file_path: nlp-architect/examples/reading_comprehension/match_lstm_mrc/prepare_data.py
imports: from __future__ import print_function
  import numpy
  import argparse
  import json
  import os
  from tqdm import tqdm
  from nlp_architect.utils.io import validate_existing_directory
  from nlp_architect.utils.text import SpacyInstance
label_desc: Use image node_id 7 for calling a global function with example usage: get_ids_list(data_list, vocab) and returns: ids_list