


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


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

       testmod()







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__lowerCamelCase   	=  {'''configuration_visual_bert''': ['''VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''VisualBertConfig''']}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       __lowerCamelCase   	=  [
           '''VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST''',
           '''VisualBertForMultipleChoice''',
           '''VisualBertForPreTraining''',
           '''VisualBertForQuestionAnswering''',
           '''VisualBertForRegionToPhraseAlignment''',
           '''VisualBertForVisualReasoning''',
           '''VisualBertLayer''',
           '''VisualBertModel''',
           '''VisualBertPreTrainedModel''',
       ]


if TYPE_CHECKING:
       from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_visual_bert import (
                  VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                  VisualBertForMultipleChoice,
                  VisualBertForPreTraining,
                  VisualBertForQuestionAnswering,
                  VisualBertForRegionToPhraseAlignment,
                  VisualBertForVisualReasoning,
                  VisualBertLayer,
                  VisualBertModel,
                  VisualBertPreTrainedModel,
              )


else:
       import sys

       __lowerCamelCase   	=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



