code: def gallery_conf():
      """Sets up a test sphinx-gallery configuration"""
  
      gallery_conf = copy.deepcopy(gen_gallery.DEFAULT_GALLERY_CONF)
      gallery_conf.update(
          examples_dir=tempfile.mkdtemp(),
          gallery_dir=tempfile.mkdtemp(),
      )
      gallery_conf["src_dir"] = gallery_conf["gallery_dir"]
  
      return gallery_conf
  
imports: from __future__ import division, absolute_import, print_function, unicode_literals
  import ast
  import codecs
  import copy
  import logging
  import tempfile
  import re
  import os
  import shutil
  import zipfile
  import pytest
  import sphinx_gallery.gen_rst
  from sphinx_gallery import gen_gallery, downloads
  from sphinx_gallery.gen_gallery import generate_dir_rst
  from sphinx_gallery import sphinx_compatibility
  import matplotlib.pyplot
label_desc: Use image node_id 7 for calling a global function with example usage: gallery_conf() and returns: gallery_conf