





import argparse


__UpperCamelCase:	Optional[int] = """docs/source/_static/js/custom.js"""


def       SCREAMING_SNAKE_CASE__  (       _lowercase     : Optional[int]			)   ->							Dict:




		'''simple docstring'''
		with open(_lowercase   ,    encoding='utf-8'   ,    newline='\n'			) as f:
				lowercase__					:      str      =		f.readlines()
		lowercase__					:      Union[str, Any]      =		0

		# First let's put the right version
		while not lines[index].startswith('const stableVersion ='			):
				index += 1
		lowercase__					:      List[Any]      =		f"""const stableVersion = \"v{version}\"\n"""

		# Then update the dictionary
		while not lines[index].startswith('const versionMapping = {'			):
				index += 1

		# We go until the end
		while not lines[index].startswith('}'			):
				index += 1
		# We add the new version at the end
		lines[index - 1] += f"""    \"v{version}\": \"v{version}\",\n"""

		with open(_lowercase   ,    'w'   ,    encoding='utf-8'   ,    newline='\n'			) as f:
				f.writelines(_lowercase			)


if __name__ == "__main__":
			__UpperCamelCase:	List[str] = argparse.ArgumentParser()
			parser.add_argument("""--version""", help="""Release version.""")
			__UpperCamelCase:	str = parser.parse_args()
			update_custom_js(args.version)









def       SCREAMING_SNAKE_CASE__  (       _lowercase     : str			)   ->							str:




		'''simple docstring'''
		if not all(char in '01' for char in bin_string			):
				raise ValueError('Non-binary value was passed to the function'			)
		if not bin_string:
				raise ValueError('Empty string was passed to the function'			)
		lowercase__					:      Tuple      =		''
		while len(_lowercase			) % 3 != 0:
				lowercase__					:      Optional[int]      =		'0' + bin_string
		lowercase__					:      List[Any]      =		[
		    bin_string[index : index + 3]
		    for index in range(len(_lowercase			)			)
		    if index % 3 == 0
		]
		for bin_group in bin_string_in_3_list:
				lowercase__					:      int      =		0
				for index, val in enumerate(_lowercase			):
						oct_val += int(2 ** (2 - index) * int(_lowercase			)			)
				oct_string += str(_lowercase			)
		return oct_string


if __name__ == "__main__":
			from doctest import testmod

			testmod()


