


"""simple docstring"""







def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_     ):




					'''simple docstring'''


					if number < 0 or shift_amount < 0:
										raise ValueError("both inputs must be positive integers"     )

					__SCREAMING_SNAKE_CASE		     =       str(bin(lowerCAmelCase_     )     )
					binary_number += "0" * shift_amount
					return binary_number




def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_     ):




					'''simple docstring'''


					if number < 0 or shift_amount < 0:
										raise ValueError("both inputs must be positive integers"     )

					__SCREAMING_SNAKE_CASE		     =       str(bin(lowerCAmelCase_     )     )[2:]
					if shift_amount >= len(lowerCAmelCase_     ):
										return "0b0"
					__SCREAMING_SNAKE_CASE		     =       binary_number[: len(lowerCAmelCase_     ) - shift_amount]
					return "0b" + shifted_binary_number




def      UpperCAmelCase__ (lowerCAmelCase_						,		lowerCAmelCase_     ):




					'''simple docstring'''


					if number >= 0:  # Get binary representation of positive number
										__SCREAMING_SNAKE_CASE		     =       "0" + str(bin(lowerCAmelCase_     )     ).strip("-"     )[2:]
					else:  # Get binary (2's complement) representation of negative number
										__SCREAMING_SNAKE_CASE		     =       len(bin(lowerCAmelCase_     )[3:]     )  # Find 2's complement of number
										__SCREAMING_SNAKE_CASE		     =       bin(abs(lowerCAmelCase_     ) - (1 << binary_number_length)     )[3:]
										__SCREAMING_SNAKE_CASE		     =       (
										    "1" + "0" * (binary_number_length - len(lowerCAmelCase_     )) + binary_number
										)

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()




"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


a__       :							List[str]        =  {}


try:
		if not is_sentencepiece_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__       :							int        =  ['''MLukeTokenizer''']

if TYPE_CHECKING:
		try:
				if not is_sentencepiece_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .tokenization_mluke import MLukeTokenizer


else:
		import sys

		a__       :							Optional[Any]        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
