def metaqa_generator():
      """Generate metaqa question answer pair.

      Yields:
        a tuple
      """
      for one_data in data:
        question, question_entity_id, answer_fact_ids = one_data
        question = np.array(question + [-1] *
                            (self.max_question_len - len(question)))
        question_entity_sketch = \
            self.cm_context.get_sketch(xs=[question_entity_id])
        answers = np.zeros(self.num_facts, dtype=bool)
        answers[answer_fact_ids] = True

        yield (question, question_entity_id, question_entity_sketch, answers), 0
Generate metaqa question answer pair.

      Yields:
        a tuple
      
language/emql/data_loader.py