





"""simple docstring"""






from typing import TYPE_CHECKING

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


lowerCAmelCase_			=							{'configuration_beit': ['BEIT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'BeitConfig', 'BeitOnnxConfig']}

try:
    if not is_vision_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase_			=							['BeitFeatureExtractor']
    lowerCAmelCase_			=							['BeitImageProcessor']

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase_			=							[
        'BEIT_PRETRAINED_MODEL_ARCHIVE_LIST',
        'BeitForImageClassification',
        'BeitForMaskedImageModeling',
        'BeitForSemanticSegmentation',
        'BeitModel',
        'BeitPreTrainedModel',
    ]


try:
    if not is_flax_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCAmelCase_			=							[
        'FlaxBeitForImageClassification',
        'FlaxBeitForMaskedImageModeling',
        'FlaxBeitModel',
        'FlaxBeitPreTrainedModel',
    ]

if TYPE_CHECKING:
    from .configuration_beit import BEIT_PRETRAINED_CONFIG_ARCHIVE_MAP, BeitConfig, BeitOnnxConfig

    try:
        if not is_vision_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .feature_extraction_beit import BeitFeatureExtractor
        from .image_processing_beit import BeitImageProcessor

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_beit import (
            BEIT_PRETRAINED_MODEL_ARCHIVE_LIST,
            BeitForImageClassification,
            BeitForMaskedImageModeling,
            BeitForSemanticSegmentation,
            BeitModel,
            BeitPreTrainedModel,
        )

    try:
        if not is_flax_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_flax_beit import (
            FlaxBeitForImageClassification,
            FlaxBeitForMaskedImageModeling,
            FlaxBeitModel,
            FlaxBeitPreTrainedModel,
        )


else:
    import sys

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









"""simple docstring"""






def       __lowerCamelCase    (       SCREAMING_SNAKE_CASE,SCREAMING_SNAKE_CASE							)		->       str:






       """simple docstring"""




       if a < 0 or b < 0:
              raise ValueError('the value of both inputs must be positive'							)

       _UpperCAmelCase     =     str(bin(SCREAMING_SNAKE_CASE							)							)[2:]  # remove the leading "0b"
       _UpperCAmelCase     =     str(bin(SCREAMING_SNAKE_CASE							)							)[2:]  # remove the leading "0b"

       _UpperCAmelCase     =     max(len(SCREAMING_SNAKE_CASE							),len(SCREAMING_SNAKE_CASE							)							)

       return "0b" + "".join(
           str(int(char_a == '1' and char_b == '1'							)							)
           for char_a, char_b in zip(a_binary.zfill(SCREAMING_SNAKE_CASE							),b_binary.zfill(SCREAMING_SNAKE_CASE							)							)							)


if __name__ == "__main__":
    import doctest

    doctest.testmod()






