code: def __init__(self, path, text_field, only_supporting=False, **kwargs):
      fields = [
          ("story", text_field),
          ("query", text_field),
          ("answer", text_field),
      ]
      self.sort_key = lambda x: len(x.query)
  
      with open(path, "r", encoding="utf-8") as f:
          triplets = self._parse(f, only_supporting)
          examples = [
              Example.fromlist(triplet, fields) for triplet in triplets
          ]
  
      super(BABI20, self).__init__(examples, fields, **kwargs)
  
file_path: pytext/pytext/legacy/datasets/babi.py
imports: import os
  from io import open
  import torch
  from ..data import Dataset, Example, Field, Iterator
label_desc: Use image node_id 1 to create a new BABI20 object from inherited base classes: Dataset with example: obj = BABI20(path, text_field, only_supporting)