def METHOD_NAME(self):
    paths = list(self.collect())
    if len(paths) == 0:
        return
    logger.info(
        "[node dependencies finished] removing\n" + "\n".join(map(str, paths))
    )
    for path in paths:
        if path in self.weak_references:
            if path.is_dir() and not is_empty(path):
                continue  # do not delete non-empty weak references, in case other chunks refer to them
        rmtree(path, ignore_errors=True)