class_docstr: TemporaryDirectory with a fully named directory. Empties the dir if not empty. 
code: def __exit__(self, exc_type, exc_val, exc_tb):
      raised = exc_type is not None
      self.cleanup(False if raised else None)
  
file_path: megatron-lm/tests/unit_tests/dist_checkpointing/__init__.py
imports: import os
  import weakref
  from pathlib import Path
  from shutil import rmtree
  from tempfile import TemporaryDirectory
  from typing import Union, Optional
  from tests.unit_tests.test_utilities import Utils
label_desc: Use image node_id 4 for calling the TempNamedDir obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) without return types