def METHOD_NAME(self, path: str) -> None:
    """
    Validate directory does not exist, creates it, register deletion of
    created directory function to Job.closer.
    :param path:
    :return:
    """
    if os.path.exists(path):
        if self._force_create_dir:
            LOGGER.info(f'Directory exist. Deleting directory {path}')
            shutil.rmtree(path)
        else:
            raise RuntimeError(f'Directory should not exist: {path}')
    os.makedirs(path)
    def _delete_dir() -> None:
        if not self._delete_created_dir:
            LOGGER.warning(f'Skip Deleting directory {path}')
            return
        LOGGER.info(f'Deleting directory {path}')
        shutil.rmtree(path)
    # Directory should be deleted after publish is finished
    Job.closer.register(_delete_dir)