code: def scan_used_functions(example_file, gallery_conf):
      
      example_code_obj = identify_names(example_file)
      if example_code_obj:
          codeobj_fname = example_file[:-3] + '_codeobj.pickle.new'
          with open(codeobj_fname, 'wb') as fid:
              pickle.dump(example_code_obj, fid, pickle.HIGHEST_PROTOCOL)
          _replace_md5(codeobj_fname)
  
      backrefs = set('{module_short}.{name}'.format(**entry)
                     for entry in example_code_obj.values()
                     if entry['module'].startswith(gallery_conf['doc_module']))
  
      return backrefs
docs: save variables so we can later add links to the documentation