parallel copier

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_path import *
        >>> import utool as ut
        >>> overwrite = False
        >>> veryverbose = False
        >>> verbose = True
        >>> src_fpath_list = [ut.grab_test_imgpath(key)
        >>>                   for key in ut.get_valid_test_imgkeys()]
        >>> dst_dpath = ut.get_app_resource_dir('utool', 'filecopy_tests')
        >>> copy_files_to(src_fpath_list, dst_dpath, overwrite=overwrite,
        >>>               verbose=verbose)

def copy_files_to(src_fpath_list, dst_dpath=None, dst_fpath_list=None,
                  overwrite=False, verbose=True, veryverbose=False):
    """
    parallel copier

    Example:
        >>> # DISABLE_DOCTEST
        >>> from utool.util_path import *
        >>> import utool as ut
        >>> overwrite = False
        >>> veryverbose = False
        >>> verbose = True
        >>> src_fpath_list = [ut.grab_test_imgpath(key)
        >>>                   for key in ut.get_valid_test_imgkeys()]
        >>> dst_dpath = ut.get_app_resource_dir('utool', 'filecopy_tests')
        >>> copy_files_to(src_fpath_list, dst_dpath, overwrite=overwrite,
        >>>               verbose=verbose)
    """
    from utool import util_list
    from utool import util_parallel

    if verbose:
        print('[util_path] +--- COPYING FILES ---')
        print('[util_path]  * len(src_fpath_list) = %r' % (len(src_fpath_list)))
        print('[util_path]  * dst_dpath = %r' % (dst_dpath,))

    if dst_fpath_list is None:
        ensuredir(dst_dpath, verbose=veryverbose)
        dst_fpath_list = [join(dst_dpath, basename(fpath))
                          for fpath in src_fpath_list]
    else:
        assert dst_dpath is None, 'dst_dpath was specified but overrided'
        assert len(dst_fpath_list) == len(src_fpath_list), 'bad correspondence'

    exists_list = list(map(exists, dst_fpath_list))
    if verbose:
        print('[util_path]  * %d files already exist dst_dpath' % (
            sum(exists_list),))
    if not overwrite:
        notexists_list = util_list.not_list(exists_list)
        dst_fpath_list_ = util_list.compress(dst_fpath_list, notexists_list)
        src_fpath_list_ = util_list.compress(src_fpath_list, notexists_list)
    else:
        dst_fpath_list_ = dst_fpath_list
        src_fpath_list_ = src_fpath_list

    args_list = zip(src_fpath_list_, dst_fpath_list_)
    _gen = util_parallel.generate2(_copy_worker, args_list,
                                   ntasks=len(src_fpath_list_))
    success_list = list(_gen)

    #success_list = copy_list(src_fpath_list_, dst_fpath_list_)
    if verbose:
        print('[util_path]  * Copied %d / %d' % (sum(success_list),
                                                 len(src_fpath_list)))
        print('[util_path] L___ DONE COPYING FILES ___')