


def 				UpperCamelCase_(      lowerCamelCase_ )    ->						list[int]:

    if length <= 0 or not isinstance(lowerCamelCase_							, lowerCamelCase_ ):
        raise ValueError('Length must be a positive integer.' )
    return [n * (2 * n - 1) for n in range(lowerCamelCase_ )]


if __name__ == "__main__":
 print(hexagonal_numbers(length=5))
 print(hexagonal_numbers(length=10))



from typing import TYPE_CHECKING

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


__UpperCamelCase		:       Tuple									=     {
    'configuration_swiftformer': [
        'SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'SwiftFormerConfig',
        'SwiftFormerOnnxConfig',
    ]
}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					__UpperCamelCase		:       Optional[Any]									=     [
					    'SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'SwiftFormerForImageClassification',
					    'SwiftFormerModel',
					    'SwiftFormerPreTrainedModel',
					]

if TYPE_CHECKING:
					from .configuration_swiftformer import (
					    SWIFTFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    SwiftFormerConfig,
					    SwiftFormerOnnxConfig,
					)

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_swiftformer import (
										    SWIFTFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    SwiftFormerForImageClassification,
										    SwiftFormerModel,
										    SwiftFormerPreTrainedModel,
										)

else:
					import sys

					__UpperCamelCase		:       List[Any]									=     _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





