



'''simple docstring'''
def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						if number < 0 or shift_amount < 0:
												raise ValueError('both inputs must be positive integers'							)

						_UpperCamelCase :		Optional[Any]			    =       str(bin(UpperCAmelCase_							)							)
						binary_number += "0" * shift_amount
						return binary_number






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						if number < 0 or shift_amount < 0:
												raise ValueError('both inputs must be positive integers'							)

						_UpperCamelCase :		Optional[int]			    =       str(bin(UpperCAmelCase_							)							)[2:]
						if shift_amount >= len(UpperCAmelCase_							):
												return "0b0"
						_UpperCamelCase :		List[Any]			    =       binary_number[: len(UpperCAmelCase_							) - shift_amount]
						return "0b" + shifted_binary_number






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_							):
						if number >= 0:  # Get binary representation of positive number
												_UpperCamelCase :		str			    =       '0' + str(bin(UpperCAmelCase_							)							).strip('-'							)[2:]
						else:  # Get binary (2's complement) representation of negative number
												_UpperCamelCase :		Optional[Any]			    =       len(bin(UpperCAmelCase_							)[3:]							)  # Find 2's complement of number
												_UpperCamelCase :		Tuple			    =       bin(abs(UpperCAmelCase_							) - (1 << binary_number_length)							)[3:]
												_UpperCamelCase :		Optional[Any]			    =       (
												    '1' + '0' * (binary_number_length - len(UpperCAmelCase_							)) + binary_number
												)

						if shift_amount >= len(UpperCAmelCase_							):
												return "0b" + binary_number[0] * len(UpperCAmelCase_							)
						return (
						    "0b"
						    + binary_number[0] * shift_amount
						    + binary_number[: len(UpperCAmelCase_							) - shift_amount]
						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()







'''simple docstring'''
from typing import TYPE_CHECKING

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


snake_case_			:     Optional[int]  	=  {
    'configuration_mask2former': [
        'MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'Mask2FormerConfig',
    ],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_			:     int  	=  ['Mask2FormerImageProcessor']

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_			:     List[Any]  	=  [
					    'MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
					    'Mask2FormerForUniversalSegmentation',
					    'Mask2FormerModel',
					    'Mask2FormerPreTrainedModel',
					]

if TYPE_CHECKING:
					from .configuration_maskaformer import MASK2FORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskaFormerConfig

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .image_processing_maskaformer import MaskaFormerImageProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_maskaformer import (
										    MASK2FORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
										    MaskaFormerForUniversalSegmentation,
										    MaskaFormerModel,
										    MaskaFormerPreTrainedModel,
										)


else:
					import sys

					snake_case_			:     Dict  	=  _LazyModule(__name__, globals()['__file__'], _import_structure)


