def get_args(args, kwargs, arg_names):
    '''Get arguments as a dict.
    '''
    n_args = len(arg_names)
    if n_args > len(args) + len(kwargs):
        raise MoultScannerError('Too many arguments supplied. Expected: {}'.format(n_args))

    out_args = {}
    for i, a in enumerate(args):
        out_args[arg_names[i]] = a

    for a in arg_names:
        if a not in out_args:
            out_args[a] = None

    out_args.update(kwargs)
    return out_args
dataset/ETHPy150Open tweekmonster/moult/moult/ast_scanner.py/get_args/swapped operands of `>`