





def   _lowercase       (    _UpperCAmelCase					)    ->	list:
				lowerCamelCase									=len(_UpperCAmelCase					)

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

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

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

				return collection


if __name__ == "__main__":
							import doctest

							doctest.testmod()












from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
)


UpperCAmelCase__    :      Optional[Any]       					={
    '''configuration_rwkv''': ['''RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''RwkvConfig''', '''RwkvOnnxConfig'''],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCAmelCase__    :      Optional[Any]       					=[
							    '''RWKV_PRETRAINED_MODEL_ARCHIVE_LIST''',
							    '''RwkvForCausalLM''',
							    '''RwkvModel''',
							    '''RwkvPreTrainedModel''',
							]


if TYPE_CHECKING:
							from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_rwkv import (
														    RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
														    RwkvForCausalLM,
														    RwkvModel,
														    RwkvPreTrainedModel,
														)
else:
							import sys

							UpperCAmelCase__    :      int       					=_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





