def parse_keyval_args(func):
    @functools.wraps(func)
    def wrapper(inst, args):
        cmd = func.__name__[3:]
        try:
            d = dict(arg.split('=') for arg in args.split())
        except ValueError:
            # there were probably spaces around the '='
            print("Invalid input: Bad arg list, or remove spaces from around "
                             "the '=' sign in your argument(s)")
            inst.do_help(cmd)
        else:
            try:
                return func(inst, **d)
            except __HOLE__ as out:
                print(out)
                inst.do_help(cmd)
    return wrapper
dataset/ETHPy150Open bkjones/bunnyq/bunnyq.py/parse_keyval_args