




'''simple docstring'''
import unittest

from transformers import BlenderbotTokenizer, BlenderbotTokenizerFast
from transformers.utils import cached_property






class 				UpperCAmelCase_			(		unittest.TestCase   ):





 @cached_property
 def     snake_case__						(      self):
     return BlenderbotTokenizer.from_pretrained("facebook/blenderbot-3B")





 @cached_property
 def     snake_case__						(      self):
     return BlenderbotTokenizerFast.from_pretrained("facebook/blenderbot-3B")





 def     snake_case__						(      self):
     snake_case_	:      Optional[Any]            =  self.tokenizer_ab
     snake_case_	:      List[str]            =  ' I am a small frog.'
     snake_case_	:      List[str]            =  tok([src_text]	,    padding=__UpperCamelCase	,    truncation=__UpperCamelCase)['input_ids']
     snake_case_	:      Dict            =  tok.batch_decode(__UpperCamelCase	,    skip_special_tokens=__UpperCamelCase	,    clean_up_tokenization_spaces=__UpperCamelCase)[0]
     assert src_text == decoded





 def     snake_case__						(      self):
     snake_case_	:      Tuple            =  self.rust_tokenizer_ab
     snake_case_	:      Tuple            =  ' I am a small frog.'
     snake_case_	:      int            =  tok([src_text]	,    padding=__UpperCamelCase	,    truncation=__UpperCamelCase)['input_ids']
     snake_case_	:      List[Any]            =  tok.batch_decode(__UpperCamelCase	,    skip_special_tokens=__UpperCamelCase	,    clean_up_tokenization_spaces=__UpperCamelCase)[0]
     assert src_text == decoded





 def     snake_case__						(      self):
     assert self.tokenizer_ab.add_prefix_space
     assert self.tokenizer_ab([" Sam", "Sam"]).input_ids == [[55_02, 2], [55_02, 2]]





 def     snake_case__						(      self):
     assert self.rust_tokenizer_ab.add_prefix_space
     assert self.rust_tokenizer_ab([" Sam", "Sam"]).input_ids == [[55_02, 2], [55_02, 2]]






'''simple docstring'''
def   UpperCamelCase_       (		__SCREAMING_SNAKE_CASE    ):
    """simple docstring"""






    snake_case_	:      Optional[int]            =  len(__SCREAMING_SNAKE_CASE    )

    # Set the gap value to be decreased by a factor of 1.3
    # after each iteration
    snake_case_	:      Optional[int]            =  1.3

    # Continue sorting until the gap is 1
    while gap > 1:
        # Decrease the gap value
        snake_case_	:      Optional[Any]            =  int(gap / shrink    )

        # Sort the elements using insertion sort
        for i in range(__SCREAMING_SNAKE_CASE,						len(__SCREAMING_SNAKE_CASE    )    ):
            snake_case_	:      Any            =  collection[i]
            snake_case_	:      int            =  i
            while j >= gap and collection[j - gap] > temp:
                snake_case_	:      Dict            =  collection[j - gap]
                j -= gap
            snake_case_	:      Optional[int]            =  temp

    return collection


if __name__ == "__main__":
  import doctest

  doctest.testmod()




