



import os
import unittest

from transformers.models.cpmant.tokenization_cpmant import VOCAB_FILES_NAMES, CpmAntTokenizer
from transformers.testing_utils import require_jieba, tooslow

from ...test_tokenization_common import TokenizerTesterMixin




@require_jieba
class 							lowerCAmelCase__  (	UpperCamelCase_					,							unittest.TestCase						):
     __A     :    Any           =						CpmAntTokenizer
     __A     :    Optional[Any]           =						False







     def  _lowercase			(       self      :     Dict):
           super().setUp()

           A__	:							List[Any]						    = [
               '<d>',
               '</d>',
               '<s>',
               '</s>',
               '</_>',
               '<unk>',
               '<pad>',
               '</n>',
               '我',
               '是',
               'C',
               'P',
               'M',
               'A',
               'n',
               't',
           ]
           A__	:							List[Any]						    = 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]))







     @tooslow
     def  _lowercase			(       self      :     List[Any]):
           A__	:							Any						    = CpmAntTokenizer.from_pretrained("openbmb/cpm-ant-10b")
           A__	:							Union[str, Any]						    = '今天天气真好！'
           A__	:							Tuple						    = ['今天', '天气', '真', '好', '！']
           A__	:							Tuple						    = tokenizer.tokenize(__a)
           self.assertListEqual(__a			,		__a)
           A__	:							Optional[int]						    = '今天天气真好！'
           A__	:							str						    = [tokenizer.bos_token] + tokens

           A__	:							Any						    = [6, 9802, 1_4962, 2082, 831, 244]
           self.assertListEqual(tokenizer.convert_tokens_to_ids(__a)			,		__a)

           A__	:							List[Any]						    = tokenizer.decode(__a)
           self.assertEqual(__a			,		__a)




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







						"""simple docstring"""

						A__	:							Tuple						    = []
						A__	:							Optional[int]						    = 1

						while len(__lowercase       ) < 1E6:
												constant.append(str(__lowercase       )       )
												i += 1

						A__	:							Any						    = "".join(__lowercase       )

						return (
						    int(constant[0]       )
						    * int(constant[9]       )
						    * int(constant[9_9]       )
						    * int(constant[9_9_9]       )
						    * int(constant[9_9_9_9]       )
						    * int(constant[9_9_9_9_9]       )
						    * int(constant[9_9_9_9_9_9]       )
						)


if __name__ == "__main__":
		print(solution())