code: def _rename_dir(
      src: tfds.core.Path,
      dst: tfds.core.Path,
  ) -> None:
      """Equivalent of `src.rename(dst)`."""
      # src.rename(dst) creates `Invalid cross-device link` on some remote file
      # systems, so uses manual operation instead.
      # Note, this is not atomic.
      shutil.copytree(src, dst)
      shutil.rmtree(src)
  
file_path: datasets/tensorflow_datasets/scripts/cleanup/refactor_dataset_as_folder.py
imports: import dataclasses
  import shutil
  from typing import Type
  from absl import app
  from absl import flags
  import tensorflow_datasets
label_desc: Use image node_id 1 for calling a global function with example usage: _rename_dir(src, dst) without return types