


'''simple docstring'''







from transformers import SqueezeBertTokenizer, SqueezeBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow

from ..bert.test_tokenization_bert import BertTokenizationTest


@require_tokenizers
class  __lowerCamelCase (       a_       ):
    """simple docstring"""
    a													=    SqueezeBertTokenizer
    a													=    SqueezeBertTokenizerFast
    a													=    True


    def    A    (  self			:							int      ,							**SCREAMING_SNAKE_CASE			:							Union[str, Any]):
           return SqueezeBertTokenizerFast.from_pretrained(self.tmpdirname      ,							**SCREAMING_SNAKE_CASE)


    @slow
    def    A    (  self			:							List[str]):
           _A     :	Union[str, Any]      =					SqueezeBertTokenizer.from_pretrained('squeezebert/squeezebert-mnli-headless')

           _A     :	Tuple      =					tokenizer.encode('sequence builders'      ,							add_special_tokens=SCREAMING_SNAKE_CASE)
           _A     :	str      =					tokenizer.encode('multi-sequence build'      ,							add_special_tokens=SCREAMING_SNAKE_CASE)

           _A     :	List[Any]      =					tokenizer.build_inputs_with_special_tokens(SCREAMING_SNAKE_CASE)
           _A     :	Tuple      =					tokenizer.build_inputs_with_special_tokens(SCREAMING_SNAKE_CASE      ,							SCREAMING_SNAKE_CASE)

           assert encoded_sentence == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id]
           assert encoded_pair == [tokenizer.cls_token_id] + text + [tokenizer.sep_token_id] + text_a + [
               tokenizer.sep_token_id
           ]










'''simple docstring'''







from __future__ import annotations






def       lowerCAmelCase__       (				lowerCamelCase     :			list   ):
       _A     :	Union[str, Any]      =					sorted(lowerCamelCase   )
       _A     :	Tuple      =					len(lowerCamelCase   )
       _A     :	int      =					length >> 1
       return (
           (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
           if length % 2 == 0
           else sorted_list[mid_index]
       )






def       lowerCAmelCase__       (				):
       import doctest

       doctest.testmod()


if __name__ == "__main__":
   main()






