



"""simple docstring"""

def __lowercase    (							_a					):
    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'''					)
    snake_case_				:  int       =			''''''
    while len(_a					) % 3 != 0:
        snake_case_				:  int       =			'''0''' + bin_string
    snake_case_				:  Any       =			[
        bin_string[index : index + 3]
        for index in range(len(_a					)					)
        if index % 3 == 0
    ]
    for bin_group in bin_string_in_3_list:
        snake_case_				:  str       =			0
        for index, val in enumerate(_a					):
            oct_val += int(2 ** (2 - index) * int(_a					)					)
        oct_string += str(_a					)
    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 __lowercase    (							_a					):
    return {key.lstrip('''-'''					): value for key, value in zip(unknown_args[::2]	,    unknown_args[1::2]					)}




def __lowercase    (							):
    snake_case_				:  List[str]       =			ArgumentParser(
        '''HuggingFace Datasets CLI tool'''	,    usage='''datasets-cli <command> [<args>]'''	,    allow_abbrev=_a					)
    snake_case_				:  List[Any]       =			parser.add_subparsers(help='''datasets-cli command helpers'''					)
    set_verbosity_info()

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

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

    # Run
    snake_case_				:  Optional[int]       =			args.func(_a	,    **_a					)
    service.run()


if __name__ == "__main__":
     main()





