



"""simple docstring"""






from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream



class     UpperCAmelCase    (	__SCREAMING_SNAKE_CASE  ):



   def __init__(       self    :	Union[str, Any]							,       __lowerCamelCase    :	Callable							,       __lowerCamelCase    :	Optional[Features] = None							,       __lowerCamelCase    :	str = None							,       __lowerCamelCase    :	bool = False							,       __lowerCamelCase    :	bool = False							,       __lowerCamelCase    :	Optional[dict] = None							,       __lowerCamelCase    :	Optional[int] = None							,       **__lowerCamelCase    :	Any							,       ):



     """simple docstring"""
     super().__init__(
         features=SCREAMING_SNAKE_CASE__							,       cache_dir=SCREAMING_SNAKE_CASE__							,       keep_in_memory=SCREAMING_SNAKE_CASE__							,       streaming=SCREAMING_SNAKE_CASE__							,       num_proc=SCREAMING_SNAKE_CASE__							,       **SCREAMING_SNAKE_CASE__							,       )
     _snake_case   	=      Generator(
         cache_dir=SCREAMING_SNAKE_CASE__							,       features=SCREAMING_SNAKE_CASE__							,       generator=SCREAMING_SNAKE_CASE__							,       gen_kwargs=SCREAMING_SNAKE_CASE__							,       **SCREAMING_SNAKE_CASE__							,       )





   def    __UpperCAmelCase    (       self    :	Dict				):



     """simple docstring"""



     if self.streaming:
       _snake_case   	=      self.builder.as_streaming_dataset(split='''train'''				)
     # Build regular (map-style) dataset
     else:
       _snake_case   	=      None
       _snake_case   	=      None
       _snake_case   	=      None
       _snake_case   	=      None

       self.builder.download_and_prepare(
           download_config=SCREAMING_SNAKE_CASE__							,       download_mode=SCREAMING_SNAKE_CASE__							,       verification_mode=SCREAMING_SNAKE_CASE__							,       base_path=SCREAMING_SNAKE_CASE__							,       num_proc=self.num_proc							,       )
       _snake_case   	=      self.builder.as_dataset(
           split='''train'''							,       verification_mode=SCREAMING_SNAKE_CASE__							,       in_memory=self.keep_in_memory				)
     return dataset







def  __lowerCamelCase					( _lowercase			)       ->      list:
     UpperCamelCase						    =					len(_lowercase			)
     for _ in range(_lowercase			):
          for i in range(_ % 2						,     arr_size - 1						,     2			):
               if arr[i + 1] < arr[i]:
                    UpperCamelCase    ,		UpperCamelCase						    =					arr[i + 1], arr[i]

     return arr


if __name__ == "__main__":
 _snake_case      = list(range(10, 0, -1))
 print(F"Original: {arr}. Sorted: {odd_even_transposition(arr)}")


