code: def rm_tree(path_to_remove: pathlib.Path):
      if path_to_remove.is_symlink():
          path_to_remove.unlink()
      elif path_to_remove.is_dir():
          for f in path_to_remove.iterdir():
              if f.is_dir():
                  rm_tree(f)
              else:
                  f.unlink()
          path_to_remove.rmdir()
      else:
          path_to_remove.unlink()
  
file_path: labml/client/labml/internal/util/__init__.py
imports: import pathlib
  import random
  import string
  from typing import Dict, Callable
  import yaml
label_desc: Use image node_id 3 for calling a global function with example usage: rm_tree(path_to_remove) without return types