




'''simple docstring'''







from __future__ import annotations






def 						_lowercase						(      lowercase_    ):



		'''simple docstring'''







		_snake_case      			=			42
		_snake_case      			=			list(lowercase_    )
		_snake_case			,       _snake_case      			=			_vector[:-1], int(_vector[-1]    )
		_snake_case      			=			[int(lowercase_    ) for digit in __vector]

		vector.reverse()
		for i, digit in enumerate(lowercase_    ):
				if i & 1 == 0:
						_snake_case      			=			digit * 2
						if doubled > 9:
								doubled -= 9
						check_digit += doubled
				else:
						check_digit += digit

		return check_digit % 10 == 0


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						assert is_luhn('79927398713')
						assert not is_luhn('79927398714')











'''simple docstring'''







from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging


_lowerCamelCase				:		List[str]				      =    logging.get_logger(__name__)

_lowerCamelCase				:		Optional[Any]				      =    {
    'MBZUAI/swiftformer-xs': 'https://huggingface.co/MBZUAI/swiftformer-xs/resolve/main/config.json',
}





class 	lowerCamelCase_				(			UpperCAmelCase_				):




					'''simple docstring'''






					lowercase__       =					"""swiftformer"""






					def __init__(       self,    __UpperCamelCase=3,    __UpperCamelCase=[3, 3, 6, 4],    __UpperCamelCase=[48, 56, 112, 220],    __UpperCamelCase=4,    __UpperCamelCase=[True, True, True, True],    __UpperCamelCase="gelu",    __UpperCamelCase=3,    __UpperCamelCase=2,    __UpperCamelCase=1,    __UpperCamelCase=0.0,    __UpperCamelCase=True,    __UpperCamelCase=1E-5,    __UpperCamelCase=1E-5,    **__UpperCamelCase,    ):
							super().__init__(**__UpperCamelCase					)
							_snake_case      			=			num_channels
							_snake_case      			=			depths
							_snake_case      			=			embed_dims
							_snake_case      			=			mlp_ratio
							_snake_case      			=			downsamples
							_snake_case      			=			hidden_act
							_snake_case      			=			down_patch_size
							_snake_case      			=			down_stride
							_snake_case      			=			down_pad
							_snake_case      			=			drop_path_rate
							_snake_case      			=			use_layer_scale
							_snake_case      			=			layer_scale_init_value
							_snake_case      			=			batch_norm_eps





class 	lowerCamelCase_				(			UpperCAmelCase_				):




					'''simple docstring'''






					lowercase__       =					version.parse("""1.11"""				)






					@property
					def 							__SCREAMING_SNAKE_CASE      (       self					):
							return OrderedDict(
							    [
							        ("pixel_values", {0: "batch", 1: "num_channels", 2: "height", 3: "width"}),
							    ]					)






					@property
					def 							__SCREAMING_SNAKE_CASE      (       self					):
							return 1E-4





