<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def assert_valid_arguments(func, *args, **kwargs):
 """ Validate provided arguments against a function's argspec. """

    # get the function argspec
    argspec = getargspec(func)

    func_defaults = argspec.defaults or tuple()
    defaults = (Required,) * (len(argspec.args) - len(func_defaults)) + func_defaults
    for index, arg_name in enumerate(argspec.args):
        arg_value = args[index] if index < len(args) else kwargs.get(arg_name)
        if arg_value is not None:
            continue
        if defaults[index] is not Required:
            continue
        abort("Missing required argument: {}".format(arg_name))