code: def python_to_jupyter_cli(args=None, namespace=None):
      """Exposes the jupyter notebook renderer to the command line
  
      Takes the same arguments as ArgumentParser.parse_args
      """
      parser = argparse.ArgumentParser(
          description="Sphinx-Gallery Notebook converter"
      )
      parser.add_argument(
          "python_src_file",
          nargs="+",
          help="Input Python file script to convert. "
          "Supports multiple files and shell wildcards"
          " (e.g. *.py)",
      )
      args = parser.parse_args(args, namespace)
  
      for src_file in args.python_src_file:
          file_conf, blocks = split_code_and_text_blocks(src_file)
          print("Converting {0}".format(src_file))
          example_nb = jupyter_notebook(blocks)
          save_notebook(example_nb, src_file.replace(".py", ".ipynb"))
  
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 9 for calling a global function with example usage: python_to_jupyter_cli(args, namespace) without return types