





"""simple docstring"""


from transformers.models.cpm.tokenization_cpm import CpmTokenizer
from transformers.testing_utils import custom_tokenizers

from ..xlnet.test_modeling_xlnet import XLNetModelTest



@custom_tokenizers
class   lowercase_					(  __lowerCAmelCase				):

       def 		_SCREAMING_SNAKE_CASE(      self ,       __SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE  ):






        '''simple docstring'''

        return True

       def 		_SCREAMING_SNAKE_CASE(      self  ):






        '''simple docstring'''

        snake_case__     				=					CpmTokenizer.from_pretrained("TsinghuaAI/CPM-Generate"  )
        snake_case__     				=					"Hugging Face大法好，谁用谁知道。"
        snake_case__     				=					"Hugging Face大法好,谁用谁知道。<unk>"
        snake_case__     				=					"▁Hu gg ing ▁ ▂ ▁F ace ▁大法 ▁好 ▁ , ▁谁 ▁用 ▁谁 ▁知 道 ▁ 。".split()

        snake_case__     				=					tokenizer.tokenize(__SCREAMING_SNAKE_CASE  )
        self.assertListEqual(__SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE  )

        snake_case__     				=					tokens + [tokenizer.unk_token]

        snake_case__     				=					[1_3789, 1_3283, 1421, 8, 10, 1164, 1_3608, 1_6528, 63, 8, 9, 440, 108, 440, 121, 90, 8, 12, 0]
        self.assertListEqual(tokenizer.convert_tokens_to_ids(__SCREAMING_SNAKE_CASE  ) ,       __SCREAMING_SNAKE_CASE  )

        snake_case__     				=					tokenizer.decode(__SCREAMING_SNAKE_CASE  )
        self.assertEqual(__SCREAMING_SNAKE_CASE ,       __SCREAMING_SNAKE_CASE  )








"""simple docstring"""


def 				a__      (	_UpperCAmelCase						,  _UpperCAmelCase						,  _UpperCAmelCase						)     ->	float:

 '''simple docstring'''






 snake_case__     				=					[1 / first_term]
 snake_case__     				=					1 / first_term
 for _ in range(number_of_terms - 1						):
  first_term += common_difference
  arithmetic_progression.append(_UpperCAmelCase						)
 snake_case__     				=					[1 / step for step in arithmetic_progression]
 return sum(_UpperCAmelCase						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   print(sum_of_harmonic_progression(1 / 2, 2, 2))

