





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available


lowercase     :			Optional[int]     						=	{}

try:
       if not is_sentencepiece_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase     :			List[Any]     						=	["""BarthezTokenizer"""]

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       lowercase     :			List[Any]     						=	["""BarthezTokenizerFast"""]


if TYPE_CHECKING:
       try:
              if not is_sentencepiece_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_barthez import BarthezTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_barthez_fast import BarthezTokenizerFast

else:
       import sys

       lowercase     :			int     						=	_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)








"""simple docstring"""




def 				a__			(					lowerCAmelCase						:							int		):






     '''simple docstring'''
     if number != int(lowerCAmelCase		):
          raise ValueError("factorial() only accepts integral values"		)
     if number < 0:
          raise ValueError("factorial() not defined for negative values"		)
     UpperCAmelCase__				:			int							=    1
     for i in range(1							,     number + 1		):
          value *= i
     return value



def 				a__			(					lowerCAmelCase						:							int		):






     '''simple docstring'''
     if not isinstance(lowerCAmelCase							,     lowerCAmelCase		):
          raise ValueError("factorial() only accepts integral values"		)
     if n < 0:
          raise ValueError("factorial() not defined for negative values"		)
     return 1 if n == 0 or n == 1 else n * factorial(n - 1		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    A__   :						Any 							=     int(input("""Enter a positive integer: """).strip() or 0)
    print(f"""factorial{n} is {factorial(n)}""")



