code: def proc_train(article):
      """Flatten each article in training data."""
      rows = []
      for paragraph in article["paragraphs"]:
          context = paragraph["context"]
          for qa in paragraph["qas"]:
              id_, question, answers = (
                  qa["id"],
                  qa["question"],
                  qa["answers"],
              )
              answer = answers[0][
                  "text"
              ]  # in training data there's only one answer
              answer_start = answers[0]["answer_start"]
              answer_end = answer_start + len(answer)
              rows.append(
                  (
                      id_,
                      context,
                      question,
                      answer,
                      answer_start,
                      answer_end,
                  )
              )
      return rows
  
imports: import re
  import json
  import spacy
  import msgpack
  import unicodedata
  import numpy
  import pandas
  import argparse
  import collections
  import multiprocessing
  from concurrent.futures import ProcessPoolExecutor
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: proc_train(article) and returns: rows