code: def plot(data1, data2, output_dir, name, pdf=True):
      fig, axs = plt.subplots(1, 2)
  
      datas = [data1, data2]
      xlabels = ["Latency (s)", "Latency (s)"]
      lb1 = min([min(dic) for dic in data1.values()]) / 1.1
      lb2 = min([min(dic) for dic in data2.values()]) / 1.1
      xmins = [lb1, lb2]
      yticks = [
          [2**0, 2**-2, 2**-4, 2**-6, 2**-8],
          [
              2**3,
              2**1,
              2**-1,
              2**-3,
          ],
      ]
      titles = ["OPT-175B", "OPT-30B"]
      legend = True
      for data, ax, xlabel, ytick, title, xmin in zip(
          datas, axs, xlabels, yticks, titles, xmins
      ):
          plot_common(
              data,
              ax,
              xlabel,
              xmin,
              ytick=ytick,
              title=title,
              legend=legend,
          )
          legend = False
  
      fig.text(
          0.07,
          0.5,
          "Generation throughput (token/s)",
          va="center",
          rotation="vertical",
          fontsize=25,
      )
  
      if pdf:
          output = os.path.join(output_dir, f"{name}.pdf")
      else:
          output = os.path.join(output_dir, f"{name}.png")
  
      figure_size = (18, 7)
      fig.set_size_inches(figure_size)
      fig.savefig(output, bbox_inches="tight")
      print(f"Output the plot to {output}")
  
file_path: H2O/h2o_flexgen/utils/plot_utils.py
imports: import matplotlib
  import matplotlib.pyplot
  import os
label_desc: Use image node_id 5 for calling a global function with example usage: plot(data1, data2, output_dir, name, pdf) without return types