<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalize_args(f, *args, **kwargs):
 """Normalize call arguments into keyword form and varargs. args can only be non-empty if there is *args in the argument specification. """

    callargs = inspect.getcallargs(f, *args, **kwargs)
    original_callargs = callargs.copy()
    try:
        argspec = inspect.getargspec(f)
    except ValueError:
        argspec = inspect.getfullargspec(f)
    else:
        argspec = fullargspec_from_argspec(argspec)

    if hasattr(argspec, 'varkw'):
        if argspec.varkw:
            kwargs = callargs.pop(argspec.varkw, {})
            callargs.update(kwargs)

    if argspec.varargs:
        varargs = callargs.pop(argspec.varargs, ())
    else:
        varargs = ()

    # now callargs is all keywords

    return NormalizedArgs(varargs=varargs,
                          normargs=callargs,
                          callargs=original_callargs)