code: def read_record(dir_path):
      df_dict = dict()
      meta_data = dict()
      meta_data["entities"] = {
          "type": "entity",
          "attrs": {"parent": "text"},
      }
      meta_data["answers"] = {
          "type": "entity",
          "attrs": {"parent": "text"},
      }
      for fold in ["train", "val", "test"]:
          if fold != "test":
              columns = [
                  "source",
                  "text",
                  "entities",
                  "query",
                  "answers",
              ]
          else:
              columns = ["source", "text", "entities", "query"]
          jsonl_path = os.path.join(dir_path, "{}.jsonl".format(fold))
          df = read_jsonl_superglue(jsonl_path)
          df_dict[fold] = df
          out = []
          for i, row in df.iterrows():
              source = row["source"]
              passage = row["passage"]
              text = passage["text"]
              entities = passage["entities"]
              entities = [
                  {"start": ele["start"], "end": ele["end"]}
                  for ele in entities
              ]
              for qas in row["qas"]:
                  query = qas["query"]
                  if fold != "test":
                      answer_entities = qas["answers"]
                      out.append(
                          (
                              source,
                              text,
                              entities,
                              query,
                              answer_entities,
                          )
                      )
                  else:
                      out.append((source, text, entities, query))
          df = pd.DataFrame(out, columns=columns)
          df_dict[fold] = df
      return df_dict, meta_data
  
imports: import os
  import shutil
  import argparse
  import zipfile
  import json
  import pandas
  import pyarrow
  import pyarrow.json
  from gluonnlp.utils.misc import download, load_checksum_stats
  from gluonnlp.base import get_data_home_dir
  from gluonnlp.data.tokenizers import WhitespaceTokenizer
label_desc: Use image node_id 21 for calling a global function with example usage: read_record(dir_path) and returns: df_dict,  meta_data