code: '''simple docstring'''
  
  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  UpperCAmelCase :
   _lowerCamelCase :					str
  
  
  
  
  
  
  
  class  UpperCAmelCase (       unittest.TestCase):
  
   def 		lowercase_						( self :	List[str]					):
  
  
  
  
  
      """simple docstring"""
  
  
  
      UpperCamelCase__ 						=						get_tests_dir("fixtures/test_sentencepiece.model"					)
      UpperCamelCase__ 						=						get_tests_dir("fixtures/test_sentencepiece_with_bytefallback.model"					)
  
      UpperCamelCase__ 						=						FakeOriginalTokenizer(vocab_file=a_					)
  
      with warnings.catch_warnings(record=a_					) as w:
         UpperCamelCase__ 						=						SpmConverter(a_					)
      self.assertEqual(len(a_					),					0					)
  
      UpperCamelCase__ 						=						FakeOriginalTokenizer(vocab_file=a_					)
  
      with warnings.catch_warnings(record=a_					) as w:
         UpperCamelCase__ 						=						SpmConverter(a_					)
      self.assertEqual(len(a_					),					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					),					)
style_context: 
  
  
  '''simple docstring'''
  
  from typing import TYPE_CHECKING
  
  from ...utils import (
      OptionalDependencyNotAvailable,
      _LazyModule,
      is_sentencepiece_available,
      is_tokenizers_available,
      is_torch_available,
  )
  
  
  __lowercase:		int							=     {
      "configuration_open_llama": ["OPEN_LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP", "OpenLlamaConfig"],
  }
  
  try:
         if not is_sentencepiece_available():
                raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
         pass
  else:
         __lowercase:		str							=     ["LlamaTokenizer"]
  
  try:
         if not is_tokenizers_available():
                raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
         pass
  else:
         __lowercase:		List[Any]							=     ["LlamaTokenizerFast"]
  
  try:
         if not is_torch_available():
                raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
         pass
  else:
         __lowercase:		Union[str, Any]							=     [
             "OpenLlamaForCausalLM",
             "OpenLlamaModel",
             "OpenLlamaPreTrainedModel",
             "OpenLlamaForSequenceClassification",
         ]
  
  
  if TYPE_CHECKING:
         from .configuration_open_llama import OPEN_LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, OpenLlamaConfig
  
         try:
                if not is_sentencepiece_available():
                       raise OptionalDependencyNotAvailable()
         except OptionalDependencyNotAvailable:
                pass
         else:
                from transformers import LlamaTokenizer
  
         try:
                if not is_tokenizers_available():
                       raise OptionalDependencyNotAvailable()
         except OptionalDependencyNotAvailable:
                pass
         else:
                from transformers import LlamaTokenizerFast
  
         try:
                if not is_torch_available():
                       raise OptionalDependencyNotAvailable()
         except OptionalDependencyNotAvailable:
                pass
         else:
                from .modeling_open_llama import (
                    OpenLlamaForCausalLM,
                    OpenLlamaForSequenceClassification,
                    OpenLlamaModel,
                    OpenLlamaPreTrainedModel,
                )
  
  
  else:
         import sys
  
         __lowercase:		Tuple							=     _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)