code: def cleanup_dir(directory: str) -> None:
      for root, dirs, files in os.walk(directory, topdown=False):
          for name in files:
              os.remove(os.path.join(root, name))
          for name in dirs:
              os.rmdir(os.path.join(root, name))
      os.rmdir(directory)
  
imports: import os
  import shutil
  from typing import Generator
  import git
  import pytest
  import torch
  import determined
  import determined.pytorch
  import model_hub.mmdetection
  import model_hub.mmdetection._callbacks
  import model_hub.utils
  from determined.common import util
label_desc: Use image node_id 1 for calling a global function with example usage: cleanup_dir(directory) without return types