class_docstr: This class ensures a unique API is used to access training, validation and test splits
  of any dataset.
  
  Args:
      n_classes (int): the number of classes.
docstr: Randomly split a dataset into non-overlapping training and validation datasets.
  
  Args:
      valid_ratio (float): the ratio for validation set
  
  Returns:
      Dataset: a torch.utils.data.Dataset
docstr_tok: ["Randomly","split","a","dataset","into","non-overlapping","training","and","validation","datasets",".","Args",":","valid_ratio","(","float",")",":","the","ratio","for","validation","set","Returns",":","Dataset",":","a","torch.utils.data.Dataset"]
code: def get_train_valid(self, valid_ratio):
      """
      Randomly split a dataset into non-overlapping training and validation datasets.
  
      Args:
          valid_ratio (float): the ratio for validation set
  
      Returns:
          Dataset: a torch.utils.data.Dataset
      """
      train_dataset = self.get_train()
  
      if valid_ratio == 0:
          return train_dataset, train_dataset
      else:
          return split_by_ratios(train_dataset, [valid_ratio])
  
file_path: pykale/kale/loaddata/dataset_access.py
imports: import torch
  import torch.utils.data
label_desc: Use image node_id 4 for calling the DatasetAccess obj's underlying member method code with example usage: obj.get_train_valid(valid_ratio) and returns: train_dataset,  train_dataset, split_by_ratios