"""simple docstring"""
from __future__ import annotations







def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->bool:
  a__:	int
  a__:	list[str]     				=      list(_SCREAMING_SNAKE_CASE  )
  a__				,       a__:	Optional[int]     				=      _vector[:-1], int(_vector[-1]  )
  a__:	list[int]     				=      [int(_SCREAMING_SNAKE_CASE  ) for digit in __vector]

  vector.reverse()
  for i, digit in enumerate(_SCREAMING_SNAKE_CASE  ):
    if i & 1 == 0:
      a__:	int     				=      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')








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


UpperCamelCase__            =     {"""configuration_vit_hybrid""": ["""VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTHybridConfig"""]}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__            =     [
					    """VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """ViTHybridForImageClassification""",
					    """ViTHybridModel""",
					    """ViTHybridPreTrainedModel""",
					]

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase__            =     ["""ViTHybridImageProcessor"""]


if TYPE_CHECKING:
					from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_vit_hybrid import (
										    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
										    ViTHybridForImageClassification,
										    ViTHybridModel,
										    ViTHybridPreTrainedModel,
										)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
					import sys

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




