





def 		A_				(     _lowerCAmelCase     )						-> str:
 if not all(char in "01" for char in bin_string     ):
  raise ValueError("Non-binary value was passed to the function"     )
 if not bin_string:
  raise ValueError("Empty string was passed to the function"     )
 UpperCamelCase	:					List[str]       	=   ""
 while len(_lowerCAmelCase     ) % 3 != 0:
  UpperCamelCase	:					int       	=   "0" + bin_string
 UpperCamelCase	:					Optional[int]       	=   [
     bin_string[index : index + 3]
     for index in range(len(_lowerCAmelCase     )     )
     if index % 3 == 0
 ]
 for bin_group in bin_string_in_3_list:
  UpperCamelCase	:					Any       	=   0
  for index, val in enumerate(_lowerCAmelCase     ):
   oct_val += int(2 ** (2 - index) * int(_lowerCAmelCase     )     )
  oct_string += str(_lowerCAmelCase     )
 return oct_string


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

    testmod()







from typing import TYPE_CHECKING

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


__lowerCamelCase       :     Optional[int]   =     {"""configuration_mmbt""": ["""MMBTConfig"""]}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase       :     List[Any]   =     ["""MMBTForClassification""", """MMBTModel""", """ModalEmbeddings"""]


if TYPE_CHECKING:
    from .configuration_mmbt import MMBTConfig

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_mmbt import MMBTForClassification, MMBTModel, ModalEmbeddings

else:
    import sys

    __lowerCamelCase       :     int   =     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
