'''simple docstring'''




from ..utils import DummyObject, requires_backends




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[int]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Tuple:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[int]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Any:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Any  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Any  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[int]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Tuple  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Any:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	str:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Any  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Tuple  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	str:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Any:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[int]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Tuple:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Tuple  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[int]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Tuple:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[int]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Any:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Any  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Any  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Tuple  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[int]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[str]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   str  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Dict:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[int]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Optional[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	str:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Tuple:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   int  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	int:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Dict  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Optional[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Any:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   Union[str, Any]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	List[Any]:
           requires_backends(self       ,	['''tokenizers''']					)




class       __UpperCAmelCase							(							metaclass=_UpperCamelCase	):





       '''simple docstring'''



       __lowercase   :   List[str]  					=							['tokenizers']

       def __init__( self       ,	*_SCREAMING_SNAKE_CASE       ,	**_SCREAMING_SNAKE_CASE					)						->	Union[str, Any]:
           requires_backends(self       ,	['''tokenizers''']					)







'''simple docstring'''




import json
import os
import tempfile

import datasets
from utils import generate_example_dataset, get_duration


__snake_case  : Dict		       =    500_000

__snake_case       ,       __snake_case  : List[str]		       =    os.path.split(__file__)
__snake_case  : Optional[Any]		       =    os.path.join(RESULTS_BASEPATH, 'results', RESULTS_FILENAME.replace('.py', '.json'))





@get_duration
def 	_UpperCAmelCase       (				_UpperCamelCase       :      datasets.Dataset  )      -> Union[str, Any]:
    A_      =  dataset.select(range(0,  len(_UpperCamelCase  ),  2  )  )





@get_duration
def 	_UpperCAmelCase       (				_UpperCamelCase       :      datasets.Dataset  )      -> str:
    A_      =  dataset.sort('''numbers'''  )





@get_duration
def 	_UpperCAmelCase       (				_UpperCamelCase       :      datasets.Dataset  )      -> str:
    A_      =  dataset.shuffle()





@get_duration
def 	_UpperCAmelCase       (				_UpperCamelCase       :      datasets.Dataset  )      -> Optional[Any]:
    A_      =  dataset.train_test_split(0.1  )





@get_duration
def 	_UpperCAmelCase       (				_UpperCamelCase       :      datasets.Dataset,  _UpperCamelCase       :      Optional[int]=10  )      -> Dict:
    for shard_id in range(_UpperCamelCase  ):
        A_      =  dataset.shard(_UpperCamelCase,  _UpperCamelCase  )





def 	_UpperCAmelCase       (				)      -> Any:
    A_      =  {'''num examples''': SPEED_TEST_N_EXAMPLES}
    A_      =  (select, sort, shuffle, train_test_split, shard)
    with tempfile.TemporaryDirectory() as tmp_dir:
        print('''generating dataset'''  )
        A_      =  datasets.Features({'''text''': datasets.Value('''string'''  ), '''numbers''': datasets.Value('''float32'''  )}  )
        A_      =  generate_example_dataset(
            os.path.join(_UpperCamelCase,  '''dataset.arrow'''  ),  _UpperCamelCase,  num_examples=_UpperCamelCase  )
        print('''Functions'''  )
        for func in functions:
            print(func.__name__  )
            A_      =  func(_UpperCamelCase  )

    with open(_UpperCamelCase,  '''wb'''  ) as f:
        f.write(json.dumps(_UpperCamelCase  ).encode('''utf-8'''  )  )


if __name__ == "__main__":  # useful to run the profiler
  benchmark_indices_mapping()






