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 __init__(
      self,
      data_access,
      valid_split_ratio=0.1,
      test_split_ratio=0.2,
      random_state: int = 1,
      test_on_all=False,
  ):
      self.domain_to_idx = data_access.domain_to_idx
      self.n_domains = len(data_access.domain_to_idx)
      self.data_access = data_access
      self._valid_split_ratio = valid_split_ratio
      self._test_split_ratio = test_split_ratio
      self._sample_by_split: Dict[str, torch.utils.data.Subset] = {}
      self._sampling_config = FixedSeedSamplingConfig(
          seed=random_state, balance_domain=True
      )
      self._loader = MultiDataLoader
      self._random_state = random_state
      self.test_on_all = test_on_all
  
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 1 to create a new MultiDomainAdapDataset object from inherited base classes: DomainsDatasetBase with example: obj = MultiDomainAdapDataset(data_access, valid_split_ratio, test_split_ratio, random_state, test_on_all)