



'''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 							_lowerCAmelCase	(  __A							):


 """simple docstring"""

 def       UpperCAmelCase_       (      self					,    _lowerCamelCase					,    _lowerCamelCase					,    _lowerCamelCase					,    _lowerCamelCase					,    _lowerCamelCase  )    ->    List[str]:
    return True







 def       UpperCAmelCase_       (      self  )    ->    int:
    A_  :		int						=					CpmTokenizer.from_pretrained("""TsinghuaAI/CPM-Generate"""  )
    A_  :		Any						=					"""Hugging Face大法好，谁用谁知道。"""
    A_  :		Dict						=					"""Hugging Face大法好,谁用谁知道。<unk>"""
    A_  :		List[str]						=					"""▁Hu gg ing ▁ ▂ ▁F ace ▁大法 ▁好 ▁ , ▁谁 ▁用 ▁谁 ▁知 道 ▁ 。""".split()

    A_  :		List[str]						=					tokenizer.tokenize(_lowerCamelCase  )
    self.assertListEqual(_lowerCamelCase					,    _lowerCamelCase  )

    A_  :		Any						=					tokens + [tokenizer.unk_token]

    A_  :		Union[str, Any]						=					[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(_lowerCamelCase  )					,    _lowerCamelCase  )

    A_  :		Optional[Any]						=					tokenizer.decode(_lowerCamelCase  )
    self.assertEqual(_lowerCamelCase					,    _lowerCamelCase  )





'''simple docstring'''





def     UpperCAmelCase     (    a_ = 9_9_8_0_0_1		)   ->       int:



   """simple docstring"""






   for number in range(n - 1      ,		9_9_9_9      ,		-1		):
      A_  :		Optional[Any]						=					str(a_		)

      # checks whether 'str_number' is a palindrome.
      if str_number == str_number[::-1]:
         A_  :		int						=					9_9_9

         # if 'number' is a product of two 3-digit numbers
         # then number is the answer otherwise fetch next number.
         while divisor != 9_9:
            if (number % divisor == 0) and (len(str(number // divisor		)		) == 3.0):
               return number
            divisor -= 1
   raise ValueError("""That number is larger than our acceptable range."""		)


if __name__ == "__main__":
  print(f'{solution() = }')
