from typing import TYPE_CHECKING

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


_SCREAMING_SNAKE_CASE     =     {
    """configuration_rwkv""": ["""RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RwkvConfig""", """RwkvOnnxConfig"""],
}

try:
     if not is_torch_available():
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     pass
else:
     _SCREAMING_SNAKE_CASE     =     [
         """RWKV_PRETRAINED_MODEL_ARCHIVE_LIST""",
         """RwkvForCausalLM""",
         """RwkvModel""",
         """RwkvPreTrainedModel""",
     ]


if TYPE_CHECKING:
     from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

     try:
          if not is_torch_available():
               raise OptionalDependencyNotAvailable()
     except OptionalDependencyNotAvailable:
          pass
     else:
          from .modeling_rwkv import (
              RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
              RwkvForCausalLM,
              RwkvModel,
              RwkvPreTrainedModel,
          )
else:
     import sys

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


def 					__lowercase						(    lowerCamelCase__       )					->int:

  '''simple docstring'''




  if not isinstance(lowerCamelCase__			,					lowerCamelCase__       ):
    raise ValueError("double_factorial() only accepts integral values"       )
  if n < 0:
    raise ValueError("double_factorial() not defined for negative values"       )
  return 1 if n <= 1 else n * double_factorial(n - 2       )


if __name__ == "__main__":
     import doctest

     doctest.testmod()

