docstr: Overriding to limit num train exs.
docstr_tok: ["Overriding","to","limit","num","train","exs","."]
code: def _setup_data(self, path):
      """
      Overriding to limit num train exs.
      """
      super()._setup_data(path)
      if self.training and self.pct_train_exs <= 1.0:
          random.seed(42)
          self.episodes = random.sample(
              self.episodes,
              int(self.num_episodes() * self.pct_train_exs),
          )
          self.num_exs = sum(len(e) for e in self.episodes)
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.teachers import ParlAIDialogTeacher
  from .build import build, get_fpath
  import copy
  import os
  import random
label_desc: Use image node_id 3 for calling the DefaultTeacher obj's underlying member method code with example usage: obj._setup_data(path) without return types