

def  __a    (				SCREAMING_SNAKE_CASE ) ->       list:






				'''simple docstring'''
				__UpperCAmelCase			   =     len(__lowercase )

				# Set the gap value to be decreased by a factor of 1.3
				# after each iteration
				__UpperCAmelCase			   =     1.3

				# Continue sorting until the gap is 1
				while gap > 1:
								# Decrease the gap value
								__UpperCAmelCase			   =     int(gap / shrink )

								# Sort the elements using insertion sort
								for i in range(__lowercase    ,				len(__lowercase ) ):
												__UpperCAmelCase			   =     collection[i]
												__UpperCAmelCase			   =     i
												while j >= gap and collection[j - gap] > temp:
																__UpperCAmelCase			   =     collection[j - gap]
																j -= gap
												__UpperCAmelCase			   =     temp

				return collection


if __name__ == "__main__":
							import doctest

							doctest.testmod()







from dataclasses import dataclass
from typing import Callable, Optional

import datasets
@dataclass
class    A_				( datasets.BuilderConfig  ):


    '''simple docstring'''






    a__       							=    None
    a__       							=    None
    a__       							=    None


    def        lowerCAmelCase_  (self					)       -> Dict:
        assert self.generator is not None, "generator must be specified"

        if self.gen_kwargs is None:
            __UpperCAmelCase			   =     {}






class    A_				( datasets.GeneratorBasedBuilder  ):


    '''simple docstring'''






    a__       							=    GeneratorConfig


    def        lowerCAmelCase_  (self					)       -> Dict:
        return datasets.DatasetInfo(features=self.config.features					)


    def        lowerCAmelCase_  (self       , lowercase__					)       -> List[str]:
        return [datasets.SplitGenerator(name=datasets.Split.TRAIN       , gen_kwargs=self.config.gen_kwargs					)]






    def        lowerCAmelCase_  (self       , **lowercase__					)       -> str:
        for idx, ex in enumerate(self.config.generator(**lowercase__					)					):
            yield idx, ex




