def _getcallargs(args, varargname, kwname, varargs, keywords):
    """Gets the dictionary of the parameter name-value of the call."""
    dct_args = {}
    varargs = tuple(varargs)
    keywords = dict(keywords)
    argcount = len(args)
    varcount = len(varargs)
    callvarargs = None
    if argcount <= varcount:
        for n, argname in enumerate(args):
            dct_args[argname] = varargs[n]
        callvarargs = varargs[-(varcount - argcount):]
    else:
        for n, var in enumerate(varargs):
            dct_args[args[n]] = var
        for argname in args[-(argcount - varcount):]:
            if argname in keywords:
                dct_args[argname] = keywords.pop(argname)
        callvarargs = ()
    if varargname is not None:
        dct_args[varargname] = callvarargs
    if kwname is not None:
        dct_args[kwname] = keywords
    dct_args.update(keywords)
    return dct_args
