



"""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 	__snake_case	(     UpperCamelCase__):




  def __init__(			self					:						Any						, __lowerCAmelCase					:						List[str] = None						, __lowerCAmelCase					:						Any = None						, __lowerCAmelCase					:						Any = None						, __lowerCAmelCase					:						List[Any] = None						, __lowerCAmelCase					:						List[str] = False						, __lowerCAmelCase					:						str = False						, __lowerCAmelCase					:						Dict = None						, **__lowerCAmelCase					:						Dict						, ):






         """simple docstring"""






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




  @abstractmethod
  def 						SCREAMING_SNAKE_CASE    (			self					:						Optional[int]		):






         """simple docstring"""






         pass






class 	__snake_case	(     UpperCamelCase__):




  def __init__(			self					:						Union[str, Any]						, __lowerCAmelCase					:						Optional[Any] = None						, __lowerCAmelCase					:						Optional[Any] = None						, __lowerCAmelCase					:						int = False						, __lowerCAmelCase					:						str = False						, __lowerCAmelCase					:						int = None						, **__lowerCAmelCase					:						int						, ):






         """simple docstring"""






         _lowerCamelCase						:    Any         =			features
         _lowerCamelCase						:    str         =			cache_dir
         _lowerCamelCase						:    Union[str, Any]         =			keep_in_memory
         _lowerCamelCase						:    Dict         =			streaming
         _lowerCamelCase						:    Optional[Any]         =			num_proc
         _lowerCamelCase						:    List[str]         =			kwargs




  @abstractmethod
  def 						SCREAMING_SNAKE_CASE    (			self					:						Union[str, Any]		):






         """simple docstring"""






         pass







"""simple docstring"""






import argparse


lowerCAmelCase__      =    '''docs/source/_static/js/custom.js'''






def 	snake_case_  (				A_ :		List[str]						):


       '''simple docstring'''





       with open(A_,    encoding='''utf-8''',    newline='''\n'''						) as f:
              _lowerCamelCase						:    int         =			f.readlines()
       _lowerCamelCase						:    List[str]         =			0

       # First let's put the right version
       while not lines[index].startswith('''const stableVersion ='''						):
              index += 1
       _lowerCamelCase						:    List[Any]         =			F'''const stableVersion = "v{version}"\n'''

       # Then update the dictionary
       while not lines[index].startswith('''const versionMapping = {'''						):
              index += 1

       # We go until the end
       while not lines[index].startswith('''}'''						):
              index += 1
       # We add the new version at the end
       lines[index - 1] += F'''    "v{version}": "v{version}",\n'''

       with open(A_,    '''w''',    encoding='''utf-8''',    newline='''\n'''						) as f:
              f.writelines(A_						)


if __name__ == "__main__":
   lowerCAmelCase__      =    argparse.ArgumentParser()
   parser.add_argument('''--version''', help='''Release version.''')
   lowerCAmelCase__      =    parser.parse_args()
   update_custom_js(args.version)


