





'''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						: Optional[Any]      =       ''
     while len(__snake_case			) % 3 != 0:
          __A						: Tuple      =       '0' + bin_string
     __A						: Dict      =       [
         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						: Optional[int]      =       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'''




from argparse import ArgumentParser

from datasets.commands.convert import ConvertCommand
from datasets.commands.dummy_data import DummyDataCommand
from datasets.commands.env import EnvironmentCommand
from datasets.commands.run_beam import RunBeamCommand
from datasets.commands.test import TestCommand
from datasets.utils.logging import set_verbosity_info






def        _lowerCAmelCase			(  __snake_case  : Tuple			)     ->     Dict:
     return {key.lstrip('-'			): value for key, value in zip(unknown_args[::2] ,							unknown_args[1::2]			)}






def        _lowerCAmelCase			(  )     ->     Tuple:
     __A						: int      =       ArgumentParser(
         'HuggingFace Datasets CLI tool' ,							usage='datasets-cli <command> [<args>]' ,							allow_abbrev=__snake_case			)
     __A						: Optional[Any]      =       parser.add_subparsers(help='datasets-cli command helpers'			)
     set_verbosity_info()

     # Register commands
     ConvertCommand.register_subcommand(__snake_case			)
     EnvironmentCommand.register_subcommand(__snake_case			)
     TestCommand.register_subcommand(__snake_case			)
     RunBeamCommand.register_subcommand(__snake_case			)
     DummyDataCommand.register_subcommand(__snake_case			)

     # Parse args
     __A ,__A						: Optional[Any]      =       parser.parse_known_args()
     if not hasattr(__snake_case ,							'func'			):
          parser.print_help()
          exit(1			)
     __A						: Any      =       parse_unknown_args(__snake_case			)

     # Run
     __A						: List[Any]      =       args.func(__snake_case ,							**__snake_case			)
     service.run()


if __name__ == "__main__":
  main()