code: def jupyter_notebook(script_blocks):
      """Generate a Jupyter notebook file cell-by-cell
  
      Parameters
      ----------
      script_blocks: list
          script execution cells
      """
  
      work_notebook = jupyter_notebook_skeleton()
      add_code_cell(work_notebook, "%matplotlib inline")
      fill_notebook(work_notebook, script_blocks)
  
      return work_notebook
  
file_path: tensorly/doc/sphinx_ext/sphinx_gallery/notebook.py
imports: from __future__ import division, absolute_import, print_function
  from functools import partial
  import argparse
  import json
  import re
  import sys
  from .py_source_parser import split_code_and_text_blocks
label_desc: Use image node_id 4 for calling a global function with example usage: jupyter_notebook(script_blocks) and returns: work_notebook