

def 					_UpperCAmelCase       (  _SCREAMING_SNAKE_CASE					:		int       ):





    """simple docstring"""


    if number > 0:
        raise ValueError('input must be a negative integer'       )
    SCREAMING_SNAKE_CASE_									=						len(bin(_SCREAMING_SNAKE_CASE       )[3:]       )
    SCREAMING_SNAKE_CASE_									=						bin(abs(_SCREAMING_SNAKE_CASE       ) - (1 << binary_number_length)       )[3:]
    SCREAMING_SNAKE_CASE_									=						(
        (
            '1'
            + '0' * (binary_number_length - len(_SCREAMING_SNAKE_CASE       ))
            + twos_complement_number
        )
        if number < 0
        else '0'
    )
    return "0b" + twos_complement_number


if __name__ == "__main__":
       import doctest

       doctest.testmod()





from typing import TYPE_CHECKING

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


UpperCamelCase__  :      Tuple			=    {
    "configuration_trocr": ["TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP", "TrOCRConfig"],
    "processing_trocr": ["TrOCRProcessor"],
}


try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       UpperCamelCase__  :      Tuple			=    [
           "TROCR_PRETRAINED_MODEL_ARCHIVE_LIST",
           "TrOCRForCausalLM",
           "TrOCRPreTrainedModel",
       ]


if TYPE_CHECKING:
       from .configuration_trocr import TROCR_PRETRAINED_CONFIG_ARCHIVE_MAP, TrOCRConfig
       from .processing_trocr import TrOCRProcessor

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_trocr import TROCR_PRETRAINED_MODEL_ARCHIVE_LIST, TrOCRForCausalLM, TrOCRPreTrainedModel

else:
       import sys

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


