class_docstr: Abstract data loader.
class_docstr_tok: ["Abstract","data","loader","."]
code: def _load_data(self, fold, domains):
      chunks = []
      for section in domains:
          domain = []
          with PathManager.open(
              os.path.join(self.dpath, section + "_all.tsv")
          ) as f:
              reader = csv.reader(f, delimiter="\t")
              next(reader)
              lines = list(reader)
          episode = []
          prev_idx = 0
          for line in lines:
              data = {}
              data["id"] = line[0]
              data["speaker"] = line[3]
              data["text"] = line[4]
              data["dialogue_acts"] = line[5:]
              data["domain"] = section
              if prev_idx != data["id"]:
                  domain.append(episode)
                  episode = []
                  prev_idx = data["id"]
              episode.append(data)
          domain.append(episode)
          chunks.append(domain)
      # deterministic shuffle data for splits
      return DatatypeHelper.split_subset_data_by_fold(
          fold, chunks, 0.8, 0.1, 0.1
      )
  
imports: from parlai.core.params import ParlaiParser
  import copy
  import os
  import csv
  from collections import Counter
  from parlai.core.opt import Opt
  import parlai.core.tod.tod_core
  from parlai.utils.misc import warn_once
  from typing import Optional
  from parlai.utils.data import DatatypeHelper
  from parlai.utils.io import PathManager
  import parlai.tasks.msr_e2e.build
  import parlai.core.tod.tod_agents
label_desc: Use image node_id 3 for calling the MsrE2EParser obj's underlying member method code with example usage: obj._load_data(fold, domains) and returns: DatatypeHelper