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 _construct_new_file_names(self, length):
      assert isinstance(length, int)
      files_len = len(self._file_names)
  
      if length < files_len:
          return self._file_names[:length]
  
      new_file_names = self._file_names * (length // files_len)
      rand_indices = paddle.randperm(files_len).tolist()
      new_indices = rand_indices[: length % files_len]
  
      new_file_names += [self._file_names[i] for i in new_indices]
  
      return new_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 5 for calling the BaseDataset obj's underlying member method code with example usage: obj._construct_new_file_names(length) and returns: new_file_names, self