code: def extract_data_from_files(json_data):
      """
      Function to read and extract data from raw input json files
      """
      data_para = []
      data_ques = []
      data_answer = []
      line_skipped = 0
      for article_id in range(len(json_data["data"])):
          sub_paragraphs = json_data["data"][article_id]["paragraphs"]
          for para_id in range(len(sub_paragraphs)):
              req_para = sub_paragraphs[para_id]["context"]
              req_para = req_para.replace("''", '" ').replace(
                  "``", '" '
              )
              para_tokens = tokenize_sentence(req_para)
              answer_map = create_token_map(req_para, para_tokens)
  
              questions = sub_paragraphs[para_id]["qas"]
              for ques_id in range(len(questions)):
                  req_question = questions[ques_id]["question"]
                  question_tokens = tokenize_sentence(req_question)
  
                  for ans_id in range(1):
                      answer_text = questions[ques_id]["answers"][
                          ans_id
                      ]["text"]
                      answer_start = questions[ques_id]["answers"][
                          ans_id
                      ]["answer_start"]
                      answer_end = answer_start + len(answer_text)
                      text_tokens = tokenize_sentence(answer_text)
                      last_word_answer = len(text_tokens[-1])
                      try:
                          a_start_idx = answer_map[answer_start][1]
  
                          a_end_idx = answer_map[
                              answer_end - last_word_answer
                          ][1]
  
                          data_para.append(para_tokens)
                          data_ques.append(question_tokens)
                          data_answer.append((a_start_idx, a_end_idx))
  
                      except KeyError:
                          line_skipped += 1
  
      return data_para, data_ques, data_answer
  
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 5 for calling a global function with example usage: extract_data_from_files(json_data) and returns: data_para,  data_ques,  data_answer