def make_temp_directory(self, directory=None):
prefix = self.__class__.__name__+'<STR_LIT:_>'<EOL>temp_directory = tempfile.mkdtemp(prefix=prefix, dir=directory)<EOL>def _destroy_temp_directory():<EOL><INDENT>shutil.rmtree(temp_directory)<EOL><DEDENT>self._cleanup.append(_destroy_temp_directory)<EOL>return temp_directory<EOL>
Creates and returns an absolute path of a directory.