@staticmethod<EOL><INDENT>def _extract_cqas(data: Dict[str, Any]) -> List[Tuple[Tuple[str, str], Tuple[List[str], List[int]]]]:<DEDENT>
cqas = []<EOL>if data:<EOL><INDENT>for article in data['<STR_LIT:data>']:<EOL><INDENT>for par in article['<STR_LIT>']:<EOL><INDENT>context = par['<STR_LIT>']<EOL>for qa in par['<STR_LIT>']:<EOL><INDENT>q = qa['<STR_LIT>']<EOL>ans_text = []<EOL>ans_start = []<EOL>for answer in qa['<STR_LIT>']:<EOL><INDENT>ans_text.append(answer['<STR_LIT:text>'])<EOL>ans_start.append(answer['<STR_LIT>'])<EOL><DEDENT>cqas.append(((context, q), (ans_text, ans_start)))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return cqas<EOL>
Extracts context, question, answer, answer_start from SQuAD data

        Args:
            data: data in squad format

        Returns:
            list of (context, question), (answer_text, answer_start)
            answer text and answer_start are lists