
"""simple docstring"""

def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		if not isinstance(a_,						a_      ):
				raise TypeError('Input value must be an \'int\' type'      )

		lowerCamelCase					:      Optional[int]          =   0
		while number:
				position += 1
				number >>= 1

		return position


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 	_lowercase       :
	lowercase_				=     42
	lowercase_				=     None
	lowercase_				=     None
	lowercase_				=     None
	lowercase_				=     None




	def       _UpperCamelCase   (			self )		->							List[str]:
			lowerCamelCase     ,   lowerCamelCase     ,   lowerCamelCase					:      List[str]          =   _str_to_version_tuple(self.version_str )




	def __repr__(			self )		->							int:
			return F"""{self.tuple[0]}.{self.tuple[1]}.{self.tuple[2]}"""




	@property
	def       _UpperCamelCase   (			self )		->							Dict:
			return self.major, self.minor, self.patch




	def       _UpperCamelCase   (			self		,			UpperCAmelCase_ )		->							Optional[int]:
			if isinstance(UpperCAmelCase_		,			UpperCAmelCase_ ):
					return Version(UpperCAmelCase_ )
			elif isinstance(UpperCAmelCase_		,			UpperCAmelCase_ ):
					return other
			raise TypeError(F"""{other} (type {type(UpperCAmelCase_ )}) cannot be compared to version.""" )




	def __eq__(			self		,			UpperCAmelCase_ )		->							Optional[Any]:
			try:
					lowerCamelCase					:      List[str]          =   self._validate_operand(UpperCAmelCase_ )
			except (TypeError, ValueError):
					return False
			else:
					return self.tuple == other.tuple




	def __lt__(			self		,			UpperCAmelCase_ )		->							Optional[int]:
			lowerCamelCase					:      Optional[int]          =   self._validate_operand(UpperCAmelCase_ )
			return self.tuple < other.tuple




	def __hash__(			self )		->							Optional[Any]:
			return hash(_version_tuple_to_str(self.tuple ) )




	@classmethod
	def       _UpperCamelCase   (			cls		,			UpperCAmelCase_ )		->							Union[str, Any]:
			lowerCamelCase					:      str          =   {f.name for f in dataclasses.fields(cls )}
			return cls(**{k: v for k, v in dic.items() if k in field_names} )




	def       _UpperCamelCase   (			self )		->							str:
			return self.version_str


def 		UpperCAmelCase (		a_      ):





		'''simple docstring'''


		lowerCamelCase					:      Tuple          =   _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_      ):





		'''simple docstring'''


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






