
"""simple docstring"""


def        lowerCAmelCase_       (		snake_case_		:      int      )       ->int:
			if number != int(snake_case_      ):
						raise ValueError('factorial() only accepts integral values'      )
			if number < 0:
						raise ValueError('factorial() not defined for negative values'      )
			lowerCamelCase__     :					Optional[Any]		=1
			for i in range(1							,   number + 1      ):
						value *= i
			return value






def        lowerCAmelCase_       (		snake_case_		:      int      )       ->int:
			if not isinstance(snake_case_							,   snake_case_      ):
						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								=						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_torch_available


lowerCAmelCase								=						{
    """configuration_decision_transformer""": [
        """DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """DecisionTransformerConfig""",
    ],
}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase								=						[
							    """DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """DecisionTransformerGPT2Model""",
							    """DecisionTransformerGPT2PreTrainedModel""",
							    """DecisionTransformerModel""",
							    """DecisionTransformerPreTrainedModel""",
							]


if TYPE_CHECKING:
							from .configuration_decision_transformer import (
							    DECISION_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    DecisionTransformerConfig,
							)

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_decision_transformer import (
														    DECISION_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    DecisionTransformerGPTaModel,
														    DecisionTransformerGPTaPreTrainedModel,
														    DecisionTransformerModel,
														    DecisionTransformerPreTrainedModel,
														)


else:
							import sys

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