def finalize(self, result):
if not self._running:<EOL><INDENT>return<EOL><DEDENT>del os.environ["<STR_LIT>"]<EOL>del os.environ["<STR_LIT>"]<EOL>if sys.platform == '<STR_LIT>':<EOL><INDENT>self.process.kill()<EOL><DEDENT>else:<EOL><INDENT>self.process.terminate()<EOL><DEDENT>self.process.wait()<EOL>shutil.rmtree(self.mongodb_param['<STR_LIT>'])<EOL>self._running = False<EOL>
Stop the mongodb instance.