code: def main(argv):
      usage = __doc__
      parser = argparse.ArgumentParser(usage)
      parser.add_argument("logfiles", nargs="*", help=argparse.SUPPRESS)
      parser.add_argument(
          "-a",
          "--showall",
          action="store_true",
          dest="showall",
          default=False,
          help="report on last build step for all outputs. "
          "Default is to report just on the last "
          "(possibly incremental) build",
      )
      parser.add_argument(
          "-g",
          "--granularity",
          type=int,
          default=50000,
          dest="granularity",
          help="minimum length time-trace event to embed in "
          "microseconds. Default: 50000",
      )
      parser.add_argument(
          "-e",
          "--embed-time-trace",
          action="store_true",
          default=False,
          dest="embed_time_trace",
          help="embed clang -ftime-trace json file found "
          "adjacent to a target file",
      )
      options = parser.parse_args()
  
      entries = []
      for pid, log_file in enumerate(options.logfiles):
          with open(log_file) as log:
              entries += list(log_to_dicts(log, pid, vars(options)))
      json.dump(entries, sys.stdout)
  
file_path: scipy/tools/ninjatracing.py
imports: import json
  import os
  import argparse
  import re
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: main(argv) without return types