code: def unlink_parent_dir(path: Path) -> None:
      
      logger.info(f"unlink {str(path)}")
      path.unlink()
  
      parent_path = path.parent
      try:
          parent_path.rmdir()
          logger.info(f"rmdir {str(parent_path)}")
      except OSError as oe:
          logger.debug(f"Did not remove {str(parent_path)}: {str(oe)}")
docs: Remove a file and if the dir is empty remove it