def teardown(self) -> None:
        """Clean up any state set after execution finishes."""
        logger.info("Cleaning up environment variables")
        logger.info("self._original_env_vars: %s", self._original_env_vars)
        for variable, original_value in self._original_env_vars.items():
            if original_value is None and variable in os.environ:
                # delete any new variables we might have created
                os.environ.pop(variable)
            elif original_value is not None and variable in os.environ:
                # if no need to delete, just set back the original value
                os.environ[variable] = original_value
            else:
                logger.info("original_value: %s", original_value)
                logger.info("variable: %s", variable)
                if variable in os.environ:
                    logger.info("os.environ[variable]: %s", os.environ[variable])
Clean up any state set after execution finishes.
olive/passes/pytorch/cluster.py