





'''simple docstring'''

def 						__UpperCamelCase						(			_UpperCAmelCase  ):
		if number != int(_UpperCAmelCase  ):
				raise ValueError("factorial() only accepts integral values"  )
		if number < 0:
				raise ValueError("factorial() not defined for negative values"  )
		__UpperCAmelCase	:							Optional[Any]     =     1
		for i in range(1,       number + 1  ):
				value *= i
		return value


def 						__UpperCamelCase						(			_UpperCAmelCase  ):
		if not isinstance(_UpperCAmelCase,       _UpperCAmelCase  ):
				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()

			lowerCAmelCase__      :   Union[str, Any]      	=			int(input("Enter a positive integer: ").strip() or 0)
			print(f"factorial{n} is {factorial(n)}")











'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCAmelCase__      :   Any      	=			{
    "configuration_open_llama": ["OPEN_LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP", "OpenLlamaConfig"],
}

try:
			if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCAmelCase__      :   Optional[int]      	=			["LlamaTokenizer"]

try:
			if not is_tokenizers_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCAmelCase__      :   int      	=			["LlamaTokenizerFast"]

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			lowerCAmelCase__      :   int      	=			[
			    "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

			lowerCAmelCase__      :   Dict      	=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)




