






from transformers import (
    DPRContextEncoderTokenizer,
    DPRContextEncoderTokenizerFast,
    DPRQuestionEncoderTokenizer,
    DPRQuestionEncoderTokenizerFast,
    DPRReaderOutput,
    DPRReaderTokenizer,
    DPRReaderTokenizerFast,
)
from transformers.testing_utils import require_tokenizers, slow
from transformers.tokenization_utils_base import BatchEncoding

from ..bert.test_tokenization_bert import BertTokenizationTest
@require_tokenizers
class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     int	=   DPRContextEncoderTokenizer
 _SCREAMING_SNAKE_CASE							:     List[Any]	=   DPRContextEncoderTokenizerFast
 _SCREAMING_SNAKE_CASE							:     List[str]	=   True



@require_tokenizers
class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     Dict	=   DPRQuestionEncoderTokenizer
 _SCREAMING_SNAKE_CASE							:     Any	=   DPRQuestionEncoderTokenizerFast
 _SCREAMING_SNAKE_CASE							:     int	=   True



@require_tokenizers
class 							A_      (  __lowercase     ):






 '''simple docstring'''




 _SCREAMING_SNAKE_CASE							:     str	=   DPRReaderTokenizer
 _SCREAMING_SNAKE_CASE							:     List[str]	=   DPRReaderTokenizerFast
 _SCREAMING_SNAKE_CASE							:     Optional[int]	=   True


 @slow
 def 	snake_case__			(		self)	->						List[str]:

     """simple docstring"""



     _UpperCAmelCase			: str     					=			self.tokenizer_class.from_pretrained('''bert-base-uncased''')

     _UpperCAmelCase			: Dict     					=			tokenizer.encode('''question sequence'''							,					add_special_tokens=_A)
     _UpperCAmelCase			: int     					=			tokenizer.encode('''title sequence'''							,					add_special_tokens=_A)
     _UpperCAmelCase			: Tuple     					=			tokenizer.encode('''text sequence ''' * 4							,					add_special_tokens=_A)
     _UpperCAmelCase			: Dict     					=			[[101] + text_a + [102] + text_a + [102] + text_a]
     _UpperCAmelCase			: Dict     					=			BatchEncoding({'''input_ids''': input_ids})

     _UpperCAmelCase			: Optional[Any]     					=			[[0] * len(input_ids[0])]
     _UpperCAmelCase			: Union[str, Any]     					=			[[0] * len(input_ids[0])]
     _UpperCAmelCase			: Any     					=			[0]
     _UpperCAmelCase			: Optional[int]     					=			DPRReaderOutput(_A							,					_A							,					_A)

     _UpperCAmelCase					,	_UpperCAmelCase			: Optional[Any]     					=			8, 9
     _UpperCAmelCase			: List[str]     					=			10
     _UpperCAmelCase			: str     					=			10
     _UpperCAmelCase			: Optional[Any]     					=			tokenizer.decode_best_spans(_A							,					_A)
     self.assertEqual(predicted_spans[0].start_index							,					_A)
     self.assertEqual(predicted_spans[0].end_index							,					_A)
     self.assertEqual(predicted_spans[0].doc_id							,					0)


 @slow
 def 	snake_case__			(		self)	->						Union[str, Any]:

     """simple docstring"""



     _UpperCAmelCase			: List[str]     					=			self.tokenizer_class.from_pretrained('''bert-base-uncased''')

     _UpperCAmelCase			: Union[str, Any]     					=			tokenizer.encode('''question sequence'''							,					add_special_tokens=_A)
     _UpperCAmelCase			: Optional[int]     					=			tokenizer.encode('''title sequence'''							,					add_special_tokens=_A)
     _UpperCAmelCase			: List[Any]     					=			tokenizer.encode('''text sequence'''							,					add_special_tokens=_A)
     _UpperCAmelCase			: Dict     					=			[101] + text_a + [102] + text_a + [102] + text_a
     _UpperCAmelCase			: List[str]     					=			tokenizer(questions=['''question sequence''']							,					titles=['''title sequence''']							,					texts=['''text sequence'''])
     self.assertIn('''input_ids'''							,					_A)
     self.assertIn('''attention_mask'''							,					_A)
     self.assertListEqual(encoded_input['''input_ids'''][0]							,					_A)












def        _lowerCamelCase		(  __A      :							list	) ->   list:
    _UpperCAmelCase			: Dict     					=			1.3
    _UpperCAmelCase			: Any     					=			len(__A	)
    _UpperCAmelCase			: List[Any]     					=			False

    while not completed:
        # Update the gap value for a next comb
        _UpperCAmelCase			: Optional[Any]     					=			int(gap / shrink_factor	)
        if gap <= 1:
            _UpperCAmelCase			: Any     					=			True

        _UpperCAmelCase			: Optional[Any]     					=			0
        while index + gap < len(__A	):
            if data[index] > data[index + gap]:
                # Swap values
                _UpperCAmelCase					,	_UpperCAmelCase			: Union[str, Any]     					=			data[index + gap], data[index]
                _UpperCAmelCase			: Any     					=			False
            index += 1

    return data


if __name__ == "__main__":
  import doctest

  doctest.testmod()

  SCREAMING_SNAKE_CASE								=  input('Enter numbers separated by a comma:\n').strip()
  SCREAMING_SNAKE_CASE								=  [int(item) for item in user_input.split(',')]
  print(comb_sort(unsorted))




