





'''simple docstring'''




def 	_lowerCAmelCase      (  __snake_case  :			str      )					->					str:
     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'      )
     __A						:			Tuple								=	''
     while len(__snake_case      ) % 3 != 0:
          __A						:			int								=	'0' + bin_string
     __A						:			str								=	[
         bin_string[index : index + 3]
         for index in range(len(__snake_case      )      )
         if index % 3 == 0
     ]
     for bin_group in bin_string_in_3_list:
          __A						:			List[str]								=	0
          for index, val in enumerate(__snake_case      ):
               oct_val += int(2 ** (2 - index) * int(__snake_case      )      )
          oct_string += str(__snake_case      )
     return oct_string


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

  testmod()






'''simple docstring'''




import argparse


lowercase__   :				Any      =   '''docs/source/_static/js/custom.js'''






def 	_lowerCAmelCase      (  __snake_case  :			Union[str, Any]      )					->					str:
     with open(__snake_case			,							encoding='utf-8'			,							newline='\n'      ) as f:
          __A						:			Optional[Any]								=	f.readlines()
     __A						:			List[str]								=	0

     # First let's put the right version
     while not lines[index].startswith('const stableVersion ='      ):
          index += 1
     __A						:			Tuple								=	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(__snake_case			,							'w'			,							encoding='utf-8'			,							newline='\n'      ) as f:
          f.writelines(__snake_case      )


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