code: def run_interactive():
      usage = build_usage()
      parser = OptionParser(usage=usage, prog="fit-NIST.py")
  
      parser.add_option(
          "-m",
          "--method",
          dest="method",
          metavar="METH",
          default="leastsq",
          help="set method name, default = 'leastsq'",
      )
  
      (opts, args) = parser.parse_args()
      dset = ""
      start = "start2"
      if len(args) > 0:
          dset = args[0]
      if len(args) > 1:
          start = args[1]
  
      if dset.lower() == "all":
          tpass = 0
          tfail = 0
          failures = []
          dsets = sorted(Models.keys())
          for dset in dsets:
              for start in ("start1", "start2", "cert"):
                  if NIST_Dataset(
                      dset,
                      method=opts.method,
                      start=start,
                      plot=False,
                      verbose=True,
                  ):
                      tpass += 1
                  else:
                      tfail += 1
                      failures.append(
                          f"   {dset} (starting at '{start}')"
                      )
          print("--------------------------------------")
          print(f" Fit Method: {opts.method} ")
          print(f" Final Results: {tpass} pass, {tfail} fail.")
          print(" Tests Failed for:\n %s" % "\n ".join(failures))
          print("--------------------------------------")
      elif dset not in Models:
          print(usage)
      else:
          return NIST_Dataset(
              dset,
              method=opts.method,
              start=start,
              plot=False,
              verbose=True,
          )
  
imports: import math
  from optparse import OptionParser
  from numpy.testing import assert_allclose
  from lmfit import Parameters, minimize
  from .NISTModels import Models, ReadNistData
label_desc: Use image node_id 5 for calling a global function with example usage: run_interactive() and returns: NIST_Dataset