code: def main():
      # check if the output file exists
      if not os.path.exists(output_file):
          IOError(
              "output file '%s' does not exist, run run_tests.py to generate it"
              % output_file
          )
  
      # read the data
      with open(output_file, "r") as f:
          data = json.load(f)
  
      # prepare the plot dir
      if not os.path.exists(plotdir):
          os.mkdir(plotdir)
  
      # loop through all keys in specs, each of them will be used for the x-axis
      for xkey in specs:
          # do not plot examples on the x-axis
          if xkey == "examples":
              continue
  
          # determine the remaining keys, do the combinatorics
          keys = [key for key in specs if key != xkey]
          for combi in itertools.product(*[specs[key] for key in keys]):
              coord = collections.OrderedDict(zip(keys, combi))
              plot_data = filter_data(data, **coord)
              plot_data.sort(key=lambda d: d[key])
              plot(xkey, coord, plot_data)
  
file_path: tfdeploy/tests/perf/create_plots.py
imports: import os
  import json
  import itertools
  import collections
  import matplotlib.pyplot
  from measure_runtimes import specs, output_file
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types