


'''simple docstring'''




from typing import TYPE_CHECKING

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


__lowercase	:   int   		=					{
    "configuration_sam": [
        "SAM_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "SamConfig",
        "SamMaskDecoderConfig",
        "SamPromptEncoderConfig",
        "SamVisionConfig",
    ],
    "processing_sam": ["SamProcessor"],
}


try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowercase	:   List[str]   		=					[
				    "SAM_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "SamModel",
				    "SamPreTrainedModel",
				]
try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowercase	:   Union[str, Any]   		=					[
				    "TF_SAM_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "TFSamModel",
				    "TFSamPreTrainedModel",
				]
try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				__lowercase	:   List[Any]   		=					["SamImageProcessor"]


if TYPE_CHECKING:
				from .configuration_sam import (
				    SAM_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    SamConfig,
				    SamMaskDecoderConfig,
				    SamPromptEncoderConfig,
				    SamVisionConfig,
				)
				from .processing_sam import SamProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_sam import SAM_PRETRAINED_MODEL_ARCHIVE_LIST, SamModel, SamPreTrainedModel

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_sam import TF_SAM_PRETRAINED_MODEL_ARCHIVE_LIST, TFSamModel, TFSamPreTrainedModel

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .image_processing_sam import SamImageProcessor

else:
				import sys

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







def  A			(   lowercase					)  ->    str:
		'''simple docstring'''

		if not isinstance(lowercase       ,			lowercase					):
				UpperCamelCase            =	(
				    'operation can not be conducted on a object of type '
				    f'''{type(lowercase					).__name__}'''
				)
				raise TypeError(lowercase					)
		UpperCamelCase            =	''
		for _ in range(0       ,			32					):
				bit_string += str(number % 2					)
				UpperCamelCase            =	number >> 1
		return bit_string


def  A			(   lowercase					)  ->    str:
		'''simple docstring'''

		if number < 0:
				raise ValueError('the value of input must be positive'					)
		elif isinstance(lowercase       ,			lowercase					):
				raise TypeError('Input value must be a \'int\' type'					)
		elif isinstance(lowercase       ,			lowercase					):
				raise TypeError('\'<\' not supported between instances of \'str\' and \'int\''					)
		UpperCamelCase            =	0
		# iterator over [1 to 32],since we are dealing with 32 bit integer
		for _ in range(1       ,			33					):
				# left shift the bits by unity
				UpperCamelCase            =	result << 1
				# get the end bit
				UpperCamelCase            =	number % 2
				# right shift the bits by unity
				UpperCamelCase            =	number >> 1
				# add that bit to our ans
				UpperCamelCase            =	result | end_bit
		return get_reverse_bit_string(lowercase					)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
