


from typing import TypeVar

from .arrow_dataset import Dataset, _split_by_node_map_style_dataset
from .iterable_dataset import IterableDataset, _split_by_node_iterable_dataset


a				:							Union[str, Any]					=	TypeVar('DatasetType', Dataset, IterableDataset)






def    _UpperCAmelCase	(   __lowerCamelCase ,     __lowerCamelCase ,     __lowerCamelCase       )		->DatasetType:


 '''simple docstring'''
 if isinstance(__lowerCamelCase ,     __lowerCamelCase       ):
  return _split_by_node_map_style_dataset(__lowerCamelCase ,     rank=__lowerCamelCase ,     world_size=__lowerCamelCase       )
 else:
  return _split_by_node_iterable_dataset(__lowerCamelCase ,     rank=__lowerCamelCase ,     world_size=__lowerCamelCase       )










from typing import Callable






def    _UpperCAmelCase	(   __lowerCamelCase       )		->Tuple:


 '''simple docstring'''

 def wrapper(__lowerCamelCase       ):
  snake_case   : str	  =      function_with_docstring.__doc__
  return target_function

 return wrapper






