

def    lowerCAmelCase__							(		SCREAMING_SNAKE_CASE_:							Any )     -> list:




				'''simple docstring'''





				A__            =     len(SCREAMING_SNAKE_CASE_ )

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

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

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

				return collection


if __name__ == "__main__":
	import doctest

	doctest.testmod()




from typing import Optional

from ..utils.logging import get_logger
from .audio_classificiation import AudioClassification
from .automatic_speech_recognition import AutomaticSpeechRecognition
from .base import TaskTemplate
from .image_classification import ImageClassification
from .language_modeling import LanguageModeling
from .question_answering import QuestionAnsweringExtractive
from .summarization import Summarization
from .text_classification import TextClassification


lowerCAmelCase__						=	[
    """AutomaticSpeechRecognition""",
    """AudioClassification""",
    """ImageClassification""",
    """LanguageModeling""",
    """QuestionAnsweringExtractive""",
    """Summarization""",
    """TaskTemplate""",
    """TextClassification""",
]

lowerCAmelCase__						=	get_logger(__name__)


lowerCAmelCase__						=	{
    AutomaticSpeechRecognition.task: AutomaticSpeechRecognition,
    AudioClassification.task: AudioClassification,
    ImageClassification.task: ImageClassification,
    LanguageModeling.task: LanguageModeling,
    QuestionAnsweringExtractive.task: QuestionAnsweringExtractive,
    Summarization.task: Summarization,
    TextClassification.task: TextClassification,
}



def    lowerCAmelCase__							(		SCREAMING_SNAKE_CASE_:							dict )     -> Optional[TaskTemplate]:




				'''simple docstring'''





				A__            =     task_template_dict.get("task" )
				if task_name is None:
								logger.warning(F'Couldn\'t find template for task \'{task_name}\'. Available templates: {list(SCREAMING_SNAKE_CASE_ )}' )
								return None
				A__            =     NAMEaTEMPLATE.get(SCREAMING_SNAKE_CASE_ )
				return template.from_dict(SCREAMING_SNAKE_CASE_ )

