

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

						snake_case_  =      str(bin(SCREAMING_SNAKE_CASE__			)			)
						binary_number += "0" * shift_amount
						return binary_number


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

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


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

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()




"""simple docstring"""







# Lint as: python3
import dataclasses
import re
from dataclasses import dataclass
from functools import total_ordering
from typing import Optional, Union


a_							=    re.compile(r"""^(?P<major>\d+)""" r"""\.(?P<minor>\d+)""" r"""\.(?P<patch>\d+)$""")







@total_ordering
@dataclass
class 					A_:







			"""simple docstring"""



			a_       :			str
			a_       :			Optional[str]												=			None
			a_       :			Optional[Union[str, int]]												=			None
			a_       :			Optional[Union[str, int]]												=			None
			a_       :			Optional[Union[str, int]]												=			None
			def    _lowerCAmelCase		(	self							):
						_lowerCamelCase       ,							_lowerCamelCase       ,							_lowerCamelCase					:					List[str]	       =    _str_to_version_tuple(self.version_str							)
			def __repr__(	self							):
						return F"{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"
			@property
			def    _lowerCAmelCase		(	self							):
						return self.major, self.minor, self.patch
			def    _lowerCAmelCase		(	self				,   A							):
						if isinstance(A				,   A							):
									return Version(A							)
						elif isinstance(A				,   A							):
									return other
						raise TypeError(F"{other} (type {type(A							)}) cannot be compared to version."							)
			def __eq__(	self				,   A							):
						try:
									_lowerCamelCase					:					Dict	       =    self._validate_operand(A							)
						except (TypeError, ValueError):
									return False
						else:
									return self.tuple == other.tuple
			def __lt__(	self				,   A							):
						_lowerCamelCase					:					Any	       =    self._validate_operand(A							)
						return self.tuple < other.tuple
			def __hash__(	self							):
						return hash(_version_tuple_to_str(self.tuple							)							)
			@classmethod
			def    _lowerCAmelCase		(	cls				,   A							):
						_lowerCamelCase					:					Optional[Any]	       =    {f.name for f in dataclasses.fields(cls							)}
						return cls(**{k: v for k, v in dic.items() if k in field_names}							)

			def    _lowerCAmelCase		(	self							):
						return self.version_str






def     UpperCAmelCase_					(				__a   :			Any						):




			'''simple docstring'''



			_lowerCamelCase					:					Union[str, Any]	       =    _VERSION_REG.match(__a						)
			if not res:
						raise ValueError(f"Invalid version '{version_str}'. Format should be x.y.z with {{x,y,z}} being digits."						)
			return tuple(int(__a						) for v in [res.group('major'						), res.group('minor'						), res.group('patch'						)]						)



def     UpperCAmelCase_					(				__a   :			List[str]						):




			'''simple docstring'''



			return ".".join(str(__a						) for v in version_tuple						)





