code: def test_config_unset_backreferences(config_app):
      """Testing Deprecation warning message against unset backreference config
  
      In this case the user is notified to update the set the
      backreferences_dir config variable if such feature is to be enabled or
      otherwise to deactivate the feature. Sphinx-Gallery should notify the
      user and also silently setup the old default config value into the new
      config style."""
  
      cfg = config_app.config
      assert cfg.project == "Sphinx-Gallery <Tests>"
      assert cfg.sphinx_gallery_conf[
          "backreferences_dir"
      ] == os.path.join("modules", "generated")
      build_warn = config_app._warning.getvalue()
  
      assert "Gallery now requires" in build_warn
      assert "'backreferences_dir': False" in build_warn
      assert "WARNING:" in build_warn
      assert "mod_example_dir" not in build_warn
  
file_path: tensorly/doc/sphinx_ext/sphinx_gallery/tests/test_gen_gallery.py
imports: from __future__ import division, absolute_import, print_function, unicode_literals
  import os
  import tempfile
  import shutil
  import pytest
  from sphinx.application import Sphinx
  from sphinx.errors import ExtensionError
  from sphinx_gallery.gen_rst import MixedEncodingStringIO
  from sphinx_gallery.gen_gallery import DEFAULT_GALLERY_CONF
  from sphinx_gallery import sphinx_compatibility
label_desc: Use image node_id 6 for calling a global function with example usage: test_config_unset_backreferences(config_app) without return types