def parse_args(tokens):
    args, kwargs = [], {}
    for token in tokens:
        token = token.lstrip('-')
        if '=' in token:
            key,val = token.split('=', 1)
            ipython_cfg = unflatten({key: yaml.load(val)})
            dict_merge(kwargs, ipython_cfg, inplace=True)
            #kwargs.update(ipython_cfg)
        else:
            args.append(yaml.load(token))

    return args, kwargs
Parses extra args from Python's argparse.
dataset/ETHPy150Open ooici/pyon/putil/script_util.py/parse_args