






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 		lowerCAmelCase_				(  UpperCamelCase ):
     __lowerCamelCase       :    Tuple 	=     DPRContextEncoderTokenizer
     __lowerCamelCase       :    List[str] 	=     DPRContextEncoderTokenizerFast
     __lowerCamelCase       :    List[Any] 	=     True




@require_tokenizers
class 		lowerCAmelCase_				(  UpperCamelCase ):
     __lowerCamelCase       :    List[Any] 	=     DPRQuestionEncoderTokenizer
     __lowerCamelCase       :    List[Any] 	=     DPRQuestionEncoderTokenizerFast
     __lowerCamelCase       :    Union[str, Any] 	=     True




@require_tokenizers
class 		lowerCAmelCase_				(  UpperCamelCase ):
     __lowerCamelCase       :    List[str] 	=     DPRReaderTokenizer
     __lowerCamelCase       :    Dict 	=     DPRReaderTokenizerFast
     __lowerCamelCase       :    int 	=     True





     @slow
     def 						lowerCamelCase							(	self  )		->				Tuple:
        lowerCamelCase									=self.tokenizer_class.from_pretrained("""bert-base-uncased"""  )

        lowerCamelCase									=tokenizer.encode("""question sequence"""							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=tokenizer.encode("""title sequence"""							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=tokenizer.encode("""text sequence """ * 4							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=[[101] + text_a + [102] + text_a + [102] + text_a]
        lowerCamelCase									=BatchEncoding({"""input_ids""": input_ids}  )

        lowerCamelCase									=[[0] * len(input_ids[0]  )]
        lowerCamelCase									=[[0] * len(input_ids[0]  )]
        lowerCamelCase									=[0]
        lowerCamelCase									=DPRReaderOutput(_UpperCAmelCase							, _UpperCAmelCase							, _UpperCAmelCase  )

        lowerCamelCase				,       lowerCamelCase									=8, 9
        lowerCamelCase									=10
        lowerCamelCase									=10
        lowerCamelCase									=tokenizer.decode_best_spans(_UpperCAmelCase							, _UpperCAmelCase  )
        self.assertEqual(predicted_spans[0].start_index							, _UpperCAmelCase  )
        self.assertEqual(predicted_spans[0].end_index							, _UpperCAmelCase  )
        self.assertEqual(predicted_spans[0].doc_id							, 0  )





     @slow
     def 						lowerCamelCase							(	self  )		->				Tuple:
        lowerCamelCase									=self.tokenizer_class.from_pretrained("""bert-base-uncased"""  )

        lowerCamelCase									=tokenizer.encode("""question sequence"""							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=tokenizer.encode("""title sequence"""							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=tokenizer.encode("""text sequence"""							, add_special_tokens=_UpperCAmelCase  )
        lowerCamelCase									=[101] + text_a + [102] + text_a + [102] + text_a
        lowerCamelCase									=tokenizer(questions=["""question sequence"""]							, titles=["""title sequence"""]							, texts=["""text sequence"""]  )
        self.assertIn("""input_ids"""							, _UpperCAmelCase  )
        self.assertIn("""attention_mask"""							, _UpperCAmelCase  )
        self.assertListEqual(encoded_input["""input_ids"""][0]							, _UpperCAmelCase  )







def  UpperCAmelCase__						(    lowerCamelCase	:			list    ):
   lowerCamelCase									=1.3
   lowerCamelCase									=len(lowerCamelCase    )
   lowerCamelCase									=False

   while not completed:
      # Update the gap value for a next comb
      lowerCamelCase									=int(gap / shrink_factor    )
      if gap <= 1:
         lowerCamelCase									=True

      lowerCamelCase									=0
      while index + gap < len(lowerCamelCase    ):
         if data[index] > data[index + gap]:
            # Swap values
            lowerCamelCase				,       lowerCamelCase									=data[index + gap], data[index]
            lowerCamelCase									=False
         index += 1

   return data


if __name__ == "__main__":
   import doctest

   doctest.testmod()

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