class_docstr: The class controlling how the multiple domains are iterated over.
  
  Args:
      data_access (MultiDomainImageFolder, or MultiDomainAccess): Multi-domain data access.
      valid_split_ratio (float, optional): Split ratio for validation set. Defaults to 0.1.
      test_split_ratio (float, optional): Split ratio for test set. Defaults to 0.2.
      random_state (int, optional): Random state for generator. Defaults to 1.
      test_on_all (bool, optional): Whether test model on all target. Defaults to False.
class_docstr_tok: ["The","class","controlling","how","the","multiple","domains","are","iterated","over",".","Args",":","data_access","(","MultiDomainImageFolder",",","or","MultiDomainAccess",")",":","Multi-domain","data","access",".","valid_split_ratio","(","float",",","optional",")",":","Split","ratio","for","validation","set",".","Defaults","to","0.1.","test_split_ratio","(","float",",","optional",")",":","Split","ratio","for","test","set",".","Defaults","to","0.2.","random_state","(","int",",","optional",")",":","Random","state","for","generator",".","Defaults","to","1.","test_on_all","(","bool",",","optional",")",":","Whether","test","model","on","all","target",".","Defaults","to","False","."]
code: def prepare_data_loaders(self):
      splits = ["test", "valid", "train"]
      self._sample_by_split["test"] = self.data_access.get_test()
      if self._sample_by_split["test"] is None:
          # split test, valid, and train set if the data access no train test splits
          if self.test_on_all:
              subset_idx = _domain_stratified_split(
                  self.data_access.domain_labels,
                  2,
                  [self._valid_split_ratio],
              )
              self._sample_by_split["valid"] = torch.utils.data.Subset(
                  self.data_access, subset_idx[0]
              )
              self._sample_by_split["train"] = torch.utils.data.Subset(
                  self.data_access, subset_idx[1]
              )
              self._sample_by_split["test"] = torch.utils.data.Subset(
                  self.data_access, np.concatenate(subset_idx)
              )
          else:
              subset_idx = _domain_stratified_split(
                  self.data_access.domain_labels,
                  3,
                  [self._test_split_ratio, self._valid_split_ratio],
              )
              for i in range(len(splits)):
                  self._sample_by_split[
                      splits[i]
                  ] = torch.utils.data.Subset(
                      self.data_access, subset_idx[i]
                  )
      else:
          # use original data split if get_test() is not none
          (
              self._sample_by_split["valid"],
              self._sample_by_split["train"],
          ) = self.data_access.get_train_valid(self._valid_split_ratio)
  
imports: import logging
  import os
  from enum import Enum
  from typing import Any, Callable, cast, Dict, List, Optional, Tuple
  import numpy
  import torch.utils.data
  from sklearn.utils import check_random_state
  from torchvision.datasets import VisionDataset
  from torchvision.datasets.folder import default_loader, has_file_allowed_extension, IMG_EXTENSIONS
  from kale.loaddata.dataset_access import DatasetAccess, get_class_subset, split_by_ratios
  from kale.loaddata.sampler import FixedSeedSamplingConfig, get_labels, MultiDataLoader, SamplingConfig
label_desc: Use image node_id 2 for calling the MultiDomainAdapDataset obj's underlying member method code with example usage: obj.prepare_data_loaders() without return types