def METHOD_NAME(self) -> Set[str]:
    """
    Generates Sphinx spelling dictionary
    Returns:
        spell words
    """
    if os.path.isdir(self._build_dir):
        shutil.rmtree(self._build_dir)
    if os.path.isdir(self._stubs_dir):
        shutil.rmtree(self._stubs_dir)
    if os.path.isdir(self._jupyter_execute_dir):
        shutil.rmtree(self._jupyter_execute_dir)
    try:
        os.mkdir(self._build_dir)
        sphinx_dict_file = os.path.join(self._build_dir, SpellDictGenerator._SPHINX_DICT_FILE)
        # create empty dictionary file
        with open(sphinx_dict_file, "w", encoding="utf8"):
            pass
        sphinx_build(
            [
                "-b",
                "spelling",
                "-D",
                f"spelling_word_list_filename={sphinx_dict_file}",
                self._docs_dir,
                self._build_dir,
            ]
        )
        self._sphinx_words = SpellDictGenerator._get_sphinx_spell_words(self._build_dir)
        return self._sphinx_words
    finally:
        if os.path.isdir(self._build_dir):
            shutil.rmtree(self._build_dir)
        if os.path.isdir(self._stubs_dir):
            shutil.rmtree(self._stubs_dir)
        if os.path.isdir(self._jupyter_execute_dir):
            shutil.rmtree(self._jupyter_execute_dir)