code: def run_main():
      import argparse
  
      parser = argparse.ArgumentParser(
          description=("Run files and convert " "output to D3")
      )
      parser.add_argument("files", nargs="*", type=str)
      parser.add_argument(
          "-d",
          "--d3-url",
          help="location of d3 library",
          type=str,
          default=None,
      )
      parser.add_argument(
          "-m",
          "--mpld3-url",
          help="location of the mpld3 library",
          type=str,
          default=None,
      )
      parser.add_argument(
          "-o",
          "--output",
          help="output filename",
          type=str,
          default="_test_plots.html",
      )
      parser.add_argument("-j", "--minjs", action="store_true")
      parser.add_argument("-l", "--local", action="store_true")
      parser.add_argument("-n", "--nolaunch", action="store_true")
      args = parser.parse_args()
  
      if len(args.files) == 0:
          wildcard = ["mpld3/test_plots/*.py", "examples/*.py"]
      else:
          wildcard = args.files
  
      if args.d3_url is None:
          args.d3_url = urls.D3_URL
      if args.mpld3_url is None:
          args.mpld3_url = urls.MPLD3_URL
  
      if args.local:
          args.d3_url = urls.D3_LOCAL
          if args.minjs:
              args.mpld3_url = urls.MPLD3MIN_LOCAL
          else:
              args.mpld3_url = urls.MPLD3_LOCAL
      else:
          if args.minjs:
              args.mpld3_url = urls.MPLD3MIN_URL
  
      print("d3 url: {0}".format(args.d3_url))
      print("mpld3 url: {0}".format(args.mpld3_url))
  
      combine_testplots(
          wildcard=wildcard,
          outfile=args.output,
          d3_url=args.d3_url,
          mpld3_url=args.mpld3_url,
      )
      return args.output, args.nolaunch
  
imports: import os
  import glob
  import sys
  import gc
  import traceback
  import itertools
  import json
  import contextlib
  import matplotlib
  import matplotlib.pyplot
  import mpld3
  from mpld3 import urls
  from mpld3._display import NumpyEncoder
  from mpld3.mpld3renderer import MPLD3Renderer
  from mpld3.mplexporter import Exporter
label_desc: Use image node_id 4 for calling a global function with example usage: run_main() and returns: args,  args