def METHOD_NAME(dir_path: str) -> str:
    """
    Remove directory later when the process ends.
    Removal failures are ignored.
    :param dir_path: Path to directory
    :return: The absolute path to the directory.
    """
    dir_path = os.path.abspath(dir_path)
    def _remove_dir_later():
        # noinspection PyBroadException
        try:
            shutil.rmtree(dir_path, ignore_errors=True)
        except BaseException:
            pass
    atexit.register(_remove_dir_later)
    return dir_path