code: def fakesphinxapp():
      orig_app = sphinx_gallery.sphinx_compatibility._app
      sphinx_gallery.sphinx_compatibility._app = app = FakeSphinxApp()
      try:
          yield app
      finally:
          sphinx_gallery.sphinx_compatibility._app = orig_app
  
file_path: tensorly/doc/sphinx_ext/sphinx_gallery/tests/conftest.py
imports: from __future__ import division, absolute_import, print_function
  import collections
  import logging
  import pytest
  import sphinx_gallery.docs_resolv
  import sphinx_gallery.gen_gallery
  import sphinx_gallery.gen_rst
  from sphinx_gallery import sphinx_compatibility
label_desc: Use image node_id 1 for calling a global function with example usage: fakesphinxapp() without return types