
'''simple docstring'''







from abc import ABC, abstractmethod
from typing import Optional, Union

from .. import Dataset, DatasetDict, Features, IterableDataset, IterableDatasetDict, NamedSplit
from ..utils.typing import NestedDataStructureLike, PathLike






class 			lowerCAmelCase__       (  lowerCamelCase_					):






					def __init__(       self    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = False    ,							__SCREAMING_SNAKE_CASE = False    ,							__SCREAMING_SNAKE_CASE = None    ,							**__SCREAMING_SNAKE_CASE    ,							):


											"""simple docstring"""





											lowercase_     :					Tuple													=	path_or_paths
											lowercase_     :					Tuple													=	split if split or isinstance(__SCREAMING_SNAKE_CASE    ,							__SCREAMING_SNAKE_CASE		) else '''train'''
											lowercase_     :					List[Any]													=	features
											lowercase_     :					Tuple													=	cache_dir
											lowercase_     :					str													=	keep_in_memory
											lowercase_     :					Dict													=	streaming
											lowercase_     :					Dict													=	num_proc
											lowercase_     :					Optional[Any]													=	kwargs






					@abstractmethod
					def      _snake_case   (       self		):


											"""simple docstring"""





											pass







class 			lowerCAmelCase__       (  lowerCamelCase_					):






					def __init__(       self    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = None    ,							__SCREAMING_SNAKE_CASE = False    ,							__SCREAMING_SNAKE_CASE = False    ,							__SCREAMING_SNAKE_CASE = None    ,							**__SCREAMING_SNAKE_CASE    ,							):


											"""simple docstring"""





											lowercase_     :					str													=	features
											lowercase_     :					Any													=	cache_dir
											lowercase_     :					List[str]													=	keep_in_memory
											lowercase_     :					int													=	streaming
											lowercase_     :					Dict													=	num_proc
											lowercase_     :					Optional[int]													=	kwargs






					@abstractmethod
					def      _snake_case   (       self		):


											"""simple docstring"""





											pass





'''simple docstring'''







from typing import Optional
from urllib.parse import quote

import huggingface_hub as hfh
from packaging import version
def  snake_case_		(    __SCREAMING_SNAKE_CASE :			str				,				__SCREAMING_SNAKE_CASE :			str				,				__SCREAMING_SNAKE_CASE :			Optional[str] = None							):



						"""simple docstring"""





						if version.parse(hfh.__version__							).release < version.parse('''0.11.0'''							).release:
												# old versions of hfh don't url-encode the file path
												lowercase_     :					int													=	quote(__SCREAMING_SNAKE_CASE							)
						return hfh.hf_hub_url(__SCREAMING_SNAKE_CASE				,				__SCREAMING_SNAKE_CASE				,				repo_type='''dataset'''				,				revision=__SCREAMING_SNAKE_CASE							)



