

import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir







@dataclass
class  __lowerCamelCase				:
      lowerCamelCase_	:      str







class  __lowerCamelCase				(	unittest.TestCase	):







      def 	lowerCAmelCase_    (     self   )						->       Optional[Any]:
        snake_case_       						=      get_tests_dir("""fixtures/test_sentencepiece.model"""   )
        snake_case_       						=      get_tests_dir("""fixtures/test_sentencepiece_with_bytefallback.model"""   )

        snake_case_       						=      FakeOriginalTokenizer(vocab_file=lowerCamelCase   )

        with warnings.catch_warnings(record=lowerCamelCase   ) as w:
          snake_case_       						=      SpmConverter(lowerCamelCase   )
        self.assertEqual(len(lowerCamelCase   )							,  0   )

        snake_case_       						=      FakeOriginalTokenizer(vocab_file=lowerCamelCase   )

        with warnings.catch_warnings(record=lowerCamelCase   ) as w:
          snake_case_       						=      SpmConverter(lowerCamelCase   )
        self.assertEqual(len(lowerCamelCase   )							,  1   )

        self.assertIn(
            """The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option"""
            """ which is not implemented in the fast tokenizers."""							,  str(w[0].message   )							,  )


def    UpperCamelCase(					lowercase_							)	->				int:





  '''simple docstring'''





  return int(lowercase_							) if x - int(lowercase_							) <= 0 else int(lowercase_							) + 1


if __name__ == "__main__":
    import doctest

    doctest.testmod()