def _apply_args_to_func(global_args, func):
    """ Unpacks the argparse Namespace object and applies its
    contents as normal arguments to the function func """
    global_args = vars(global_args)
    local_args = dict()
    for argument in inspect.getargspec(func).args:
        local_args[argument] = global_args[argument]
    return func(**local_args)
def _apply_args_to_func ( global_args , func ) : global_args = vars ( global_args ) local_args = dict ( ) for argument in inspect . getargspec ( func ) . args : local_args [ argument ] = global_args [ argument ] return func ( ** local_args )
Unpacks the argparse Namespace object and applies its
    contents as normal arguments to the function func