def METHOD_NAME(
    src: Path,
    dest: Path,
    copy_excludes: typing.Optional[typing.List[str]] = None,
    patch_func: typing.Callable[[], None] = owlbot_patch,
) -> None:
    """Copies files from generated tree."""
    entries = os.scandir(src)
    if not entries:
        logger.info("there is no version subdirectory to copy")
        return
    for entry in entries:
        if entry.is_dir():
            version_src = Path(entry.path).resolve()
            owlbot_copy_version(version_src, dest, copy_excludes)
    with pushd(dest):
        patch_func()