code: 
  
  
  
  
  
  import os
  import unittest
  
  from transformers import MPNetTokenizerFast
  from transformers.models.mpnet.tokenization_mpnet import VOCAB_FILES_NAMES, MPNetTokenizer
  from transformers.testing_utils import require_tokenizers, slow
  
  from ...test_tokenization_common import TokenizerTesterMixin
  
  @require_tokenizers
  class 				A    (__UpperCAmelCase       ,unittest.TestCase				):
        _SCREAMING_SNAKE_CASE					=							MPNetTokenizer
        _SCREAMING_SNAKE_CASE					=							MPNetTokenizerFast
        _SCREAMING_SNAKE_CASE					=							True
        _SCREAMING_SNAKE_CASE					=							True
  
  
  
        def    __a (					self					)      ->   Dict:
  
  
  
               '''simple docstring'''
  
               super().setUp()
  
               _snake_case      :							Tuple     				=						[
                   '''[UNK]''',
                   '''[CLS]''',
                   '''[SEP]''',
                   '''[PAD]''',
                   '''[MASK]''',
                   '''want''',
                   '''##want''',
                   '''##ed''',
                   '''wa''',
                   '''un''',
                   '''runn''',
                   '''##ing''',
                   ''',''',
                   '''low''',
                   '''lowest''',
               ]
               _snake_case      :							List[str]     				=						os.path.join(self.tmpdirname     ,  VOCAB_FILES_NAMES['''vocab_file''']					)
               with open(self.vocab_file     ,  '''w'''     ,  encoding='''utf-8'''					) as vocab_writer:
                      vocab_writer.write(''''''.join([x + '''\n''' for x in vocab_tokens]					)					)
  
  
  
        def    __a (					self     ,  lowercase_					)      ->   Dict:
  
  
  
               '''simple docstring'''
  
               _snake_case      :							Dict     				=						'''UNwant\u00E9d,running'''
               _snake_case      :							int     				=						'''unwanted, running'''
               return input_text, output_text
  
  
  
        def    __a (					self					)      ->   List[Any]:
  
  
  
               '''simple docstring'''
  
               _snake_case      :							Union[str, Any]     				=						self.tokenizer_class(self.vocab_file					)
  
               _snake_case      :							Optional[int]     				=						tokenizer.tokenize('''UNwant\u00E9d,running'''					)
               self.assertListEqual(lowercase_     ,  ['''un''', '''##want''', '''##ed''', ''',''', '''runn''', '''##ing''']					)
               self.assertListEqual(tokenizer.convert_tokens_to_ids(lowercase_					)     ,  [9, 6, 7, 12, 10, 11]					)
  
  
  
        @slow
        def    __a (					self					)      ->   str:
  
  
  
               '''simple docstring'''
  
               _snake_case      :							Optional[Any]     				=						self.tokenizer_class.from_pretrained('''microsoft/mpnet-base'''					)
  
               _snake_case      :							List[str]     				=						tokenizer.encode('''sequence builders'''     ,  add_special_tokens=lowercase_					)
               _snake_case      :							Optional[int]     				=						tokenizer.encode('''multi-sequence build'''     ,  add_special_tokens=lowercase_					)
  
               _snake_case      :							int     				=						tokenizer.build_inputs_with_special_tokens(lowercase_					)
               _snake_case      :							List[str]     				=						tokenizer.build_inputs_with_special_tokens(lowercase_     ,  lowercase_					)
  
               assert encoded_sentence == [0] + text + [2]
               assert encoded_pair == [0] + text + [2] + [2] + text_a + [2]
  
  
  
  
  
  
  
style_context: 
  
  
  
  
  
  import numpy as np
  
  
  
  
  def 						A_			(  lowercase_  )			->						Optional[Any]:
         _snake_case      :							Union[str, Any]     				=						np.exp(lowercase_  )
  
         # Add up the all the exponentials
         _snake_case      :							List[str]     				=						np.sum(lowercase_  )
  
         # Divide every exponent by the sum of all exponents
         _snake_case      :							Optional[int]     				=						exponent_vector / sum_of_exponents
  
         return softmax_vector
  
  
  if __name__ == "__main__":
     print(softmax((0,)))
  
  
  
  
  
  
  