docs: def copy_tree(src_path, dest_path):
      """Copies the entire folder tree, recursively, from the given source path
      to the given destination path. If the destination path does not exist, it
      will be created. If it does, any files/folders within it will be
      overwritten, but none will be deleted."""
      files_copied = 0
      if os.path.isdir(src_path):
          # if the destination folder doesn't exist, create it
          if not os.path.isdir(dest_path):
              os.makedirs(dest_path)
  
          for entry in os.listdir(src_path):
              src_entry_path = os.path.join(src_path, entry)
              dest_entry_path = os.path.join(dest_path, entry)
              # if it's a sub-folder
              if os.path.isdir(src_entry_path):
                  # copy its contents recursively
                  files_copied += copy_tree(src_entry_path, dest_entry_path)
              else:
                  copy_file_if_modified(src_entry_path, dest_entry_path)
                  files_copied += 1
  
      return files_copied