code: def test_jupyter_notebook():
      """Test that written ipython notebook file corresponds to python object"""
      file_conf, blocks = sg.split_code_and_text_blocks(
          "tutorials/plot_parse.py"
      )
      example_nb = jupyter_notebook(blocks)
  
      with tempfile.NamedTemporaryFile("w", delete=False) as f:
          save_notebook(example_nb, f.name)
      try:
          with open(f.name, "r") as fname:
              assert json.load(fname) == example_nb
      finally:
          os.remove(f.name)
  
file_path: tensorly/doc/sphinx_ext/sphinx_gallery/tests/test_notebook.py
imports: from __future__ import division, absolute_import, print_function
  import json
  import tempfile
  import os
  import pytest
  import sphinx_gallery.gen_rst
  from sphinx_gallery.notebook import rst2md, jupyter_notebook, save_notebook, python_to_jupyter_cli
label_desc: Use image node_id 3 for calling a global function with example usage: test_jupyter_notebook() without return types