def _copy_file(file, source_dir, dest_dir):
    'Copies a file to a given path, taking care of creating directories if\n    needed.\n    '
    source = os.path.join(source_dir, file)
    destination = os.path.join(dest_dir, file)
    _ensure_directory(destination)
    shutil.copy2(source, destination)
Copies a file to a given path, taking care of creating directories if
needed.
def _copy_file(file, source_dir, dest_dir):
    'Copies a file to a given path, taking care of creating directories if\n    needed.\n    '
    source = os.path.join(source_dir, file)
    destination = os.path.join(dest_dir, file)
    _ensure_directory(destination)
    shutil.copy2(source, destination)