code: def refactor_dataset(ds_name: str) -> None:
      """Refactor a single dataset."""
      code_info = BuilderCodeInfo.from_builder_cls(
          tfds.builder_cls(ds_name)
      )
  
      print(f"Refactoring {code_info.name} in {code_info.dst}")
  
      # Eventually cleanup previous refactoring.
      if code_info.dst.exists():
          print(f"Cleanup existing {code_info.dst}")
          shutil.rmtree(code_info.dst)
      code_info.dst.mkdir()
  
      # Copy all files and folders
      _add_init_file(code_info)
      _mv_code(code_info)
      _mv_code_test(code_info)
      _mv_checksums(code_info)
      _mv_fake_data_dir(code_info)
      _mv_create_fake_data(code_info)
  
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 8 for calling a global function with example usage: refactor_dataset(ds_name) without return types