code: def get_size(size_type, source_dataset, *other_datasets):
      if size_type is DatasetSizeType.Max:
          return max(
              list(map(len, other_datasets)) + [len(source_dataset)]
          )
      elif size_type is DatasetSizeType.Source:
          return len(source_dataset)
      else:
          raise ValueError(
              f"Size type size must be 'max' or 'source', had '{size_type}'"
          )
  
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 for calling the DatasetSizeType obj's underlying member method code with example usage: obj.get_size(size_type, source_dataset) and returns: max, len