class_docstr: Pass in a custom dataset that conforms to the format.
  
  Args:
      mode (str, optional): which part of dataset to use. it is one of ('train', 'val', 'test'). Default: 'train'.
      transforms (list): Transforms for image.
      dataset_root (str): The dataset directory.
      train_path (str, optional): The train dataset file. When mode is 'train', train_path is necessary.
          The contents of train_path file are as follow:
          image1.jpg ground_truth1.png
          image2.jpg ground_truth2.png
      val_path (str, optional): The evaluation dataset file. When mode is 'val', val_path is necessary.
          The contents is the same as train_path
      file_length (int, optional): The number of trainable data in the dataset. Default: None.
      ignore_index (int, optional): The category that needs to be ignored during the training process.
      separator (str, optional): The separator of dataset list.
code: def _get_file_names(self, split_name, train_extra=False):
      assert split_name in ["train", "val"]
      source = self._train_source
      if split_name == "val":
          source = self._eval_source
  
      file_names = []
      with open(source) as f:
          files = f.readlines()
  
      for item in files:
          img_name, gt_name = self._process_item_names(
              item, self.separator
          )
          file_names.append([img_name, gt_name])
  
      if train_extra:
          file_names2 = []
          source2 = self._train_source.replace("train", "train_extra")
          with open(source2) as f:
              files2 = f.readlines()
  
          for item in files2:
              img_name, gt_name = self._process_item_names(
                  item, self.separator
              )
              file_names2.append([img_name, gt_name])
  
          return file_names, file_names2
  
      return file_names
  
file_path: PaddleSeg/contrib/CrossPseudoSupervision/datasets/basedataset.py
imports: import os
  import paddle
  import numpy
  from paddle.io import Dataset
  from paddleseg.transforms import Compose
label_desc: Use image node_id 4 for calling the BaseDataset obj's underlying member method code with example usage: obj._get_file_names(split_name, train_extra) and returns: file_names, file_names,  file_names2