def pre_execute(self, execution, context):
path = self._fspath<EOL>if path:<EOL><INDENT>path = path.format(<EOL>benchmark=context.benchmark,<EOL>api=execution['<STR_LIT>'],<EOL>**execution.get('<STR_LIT>', {})<EOL>)<EOL>if self.clean_path:<EOL><INDENT>shutil.rmtree(path, ignore_errors=True)<EOL><DEDENT>if execution['<STR_LIT>']['<STR_LIT>'] == '<STR_LIT>':<EOL><INDENT>path = osp.dirname(path)<EOL><DEDENT>if not osp.exists(path):<EOL><INDENT>os.makedirs(path)<EOL><DEDENT><DEDENT>
Make sure the named directory is created if possible