



"""simple docstring"""





def 	__UpperCAmelCase					(       snake_case_  :  str   )							->	int:






   """simple docstring"""


   _lowerCAmelCase					     =		str(snake_case_   ).strip()
   if not oct_string:
      raise ValueError("""Empty string was passed to the function"""   )
   _lowerCAmelCase					     =		oct_string[0] == """-"""
   if is_negative:
      _lowerCAmelCase					     =		oct_string[1:]
   if not oct_string.isdigit() or not all(0 <= int(snake_case_   ) <= 7 for char in oct_string   ):
      raise ValueError("""Non-octal value was passed to the function"""   )
   _lowerCAmelCase					     =		0
   for char in oct_string:
      _lowerCAmelCase					     =		8 * decimal_number + int(snake_case_   )
   if is_negative:
      _lowerCAmelCase					     =		-decimal_number
   return decimal_number


if __name__ == "__main__":
  from doctest import testmod

  testmod()




"""simple docstring"""





from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE				:     Union[str, Any]          =	{
    '''configuration_align''': [
        '''ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''AlignConfig''',
        '''AlignTextConfig''',
        '''AlignVisionConfig''',
    ],
    '''processing_align''': ['''AlignProcessor'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  SCREAMING_SNAKE_CASE				:     Any          =	[
      '''ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''AlignModel''',
      '''AlignPreTrainedModel''',
      '''AlignTextModel''',
      '''AlignVisionModel''',
  ]

if TYPE_CHECKING:
  from .configuration_align import (
      ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
      AlignConfig,
      AlignTextConfig,
      AlignVisionConfig,
  )
  from .processing_align import AlignProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_align import (
        ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
        AlignModel,
        AlignPreTrainedModel,
        AlignTextModel,
        AlignVisionModel,
    )

else:
  import sys

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