code: def touch_empty_backreferences(app, what, name, obj, options, lines):
      
  
      if not bool(app.config.sphinx_gallery_conf['backreferences_dir']):
          return
  
      examples_path = os.path.join(app.srcdir,
                                   app.config.sphinx_gallery_conf[
                                       "backreferences_dir"],
                                   "%s.examples" % name)
  
      if not os.path.exists(examples_path):
          # touch file
          open(examples_path, 'w').close()
docs: Generate empty back-reference example files
  
      This avoids inclusion errors/warnings if there are no gallery
      examples for a class / module that is being parsed by autodoc