code: def test_zip_notebooks(gallery_conf):
      """Test generated zipfiles are not corrupt"""
      gallery_conf.update(examples_dir="examples")
      examples = downloads.list_downloadable_sources(
          gallery_conf["examples_dir"]
      )
      zipfilepath = downloads.python_zip(
          examples, gallery_conf["gallery_dir"]
      )
      zipf = zipfile.ZipFile(zipfilepath)
      check = zipf.testzip()
      if check:
          raise OSError("Bad file in zipfile: {0}".format(check))
  
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 13 for calling a global function with example usage: test_zip_notebooks(gallery_conf) without return types