



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase								=   {
    """configuration_prophetnet""": ["""PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ProphetNetConfig"""],
    """tokenization_prophetnet""": ["""ProphetNetTokenizer"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	UpperCAmelCase								=   [
	    """PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """ProphetNetDecoder""",
	    """ProphetNetEncoder""",
	    """ProphetNetForCausalLM""",
	    """ProphetNetForConditionalGeneration""",
	    """ProphetNetModel""",
	    """ProphetNetPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_prophetnet import PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP, ProphetNetConfig
	from .tokenization_prophetnet import ProphetNetTokenizer

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_prophetnet import (
		    PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST,
		    ProphetNetDecoder,
		    ProphetNetEncoder,
		    ProphetNetForCausalLM,
		    ProphetNetForConditionalGeneration,
		    ProphetNetModel,
		    ProphetNetPreTrainedModel,
		)

else:
	import sys

	UpperCAmelCase								=   _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






def      A_ (		__a       :			int						):

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

def      A_ (		__a       :			int						):

				"""simple docstring"""
				if not isinstance(__a	,						__a						):
								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()

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

