code: def generate_profile_graph():
      click.secho("*Preparing Profile graphs...", fg="green")
  
      plot_data = {}
      for m in metrics:
          file_path = f"{execution_params['tmp_dir']}/benchmark/{m}"
          if is_file_empty(file_path):
              continue
          df = pd.read_csv(file_path, header=None)
          m = m.split(".txt")[0]
          plot_data[f"{m}_index"] = df.index
          plot_data[f"{m}_values"] = df.values
  
      if execution_params["requests"] > 100:
          sampling = int(execution_params["requests"] / 100)
      else:
          sampling = 1
      print(f"Working with sampling rate of {sampling}")
  
      a4_dims = (11.7, 8.27)
      grid = plt.GridSpec(3, 2, wspace=0.2, hspace=0.2)
      plt.figure(figsize=a4_dims)
      fig1 = plt.subplot(grid[0, 0])
      fig2 = plt.subplot(grid[0, 1])
      fig3 = plt.subplot(grid[1, 0])
      fig4 = plt.subplot(grid[1, 1])
      fig5 = plt.subplot(grid[2, 0:])
  
      def plot_line(fig, data, color="blue", title=None):
          fig.set_title(title)
          fig.set_ylabel("Time (ms)")
          fig.set_xlabel("Percentage of queries")
          fig.grid()
          plot_points = np.arange(0, 100, 100 / len(data))
          x = plot_points[: len(data) : sampling]
          y = data[::sampling]
          fig.plot(x, y, f"tab:{color}")
  
      # Queue Time
      plot_line(
          fig1,
          data=plot_data["waiting_time_values"],
          color="pink",
          title="Queue Time",
      )
  
      # handler Predict Time
      plot_line(
          fig2,
          data=plot_data["handler_time_values"],
          color="orange",
          title="Handler Time(pre & post processing + inference time)",
      )
  
      # Worker time
      plot_line(
          fig3,
          data=plot_data["worker_thread_values"],
          color="green",
          title="Worker Thread Time",
      )
  
      # Predict Time
      plot_line(
          fig4,
          data=plot_data["predict_values"],
          color="red",
          title="Prediction time(handler time+python worker overhead)",
      )
  
      # Plot in one graph
      plot_line(
          fig5, data=plot_data["waiting_time_values"], color="pink"
      )
      plot_line(
          fig5, data=plot_data["handler_time_values"], color="orange"
      )
      plot_line(fig5, data=plot_data["predict_values"], color="red")
      plot_line(
          fig5,
          data=plot_data["worker_thread_values"],
          color="green",
          title="Combined Graph",
      )
      fig5.grid()
      plt.savefig(
          f"{execution_params['report_location']}/benchmark/api-profile1.png",
          bbox_inches="tight",
      )
  
imports: import csv
  import json
  import os
  import re
  import shutil
  import sys
  import tempfile
  import time
  from subprocess import PIPE, Popen
  from urllib.parse import urlparse
  import click
  import click_config_file
  import matplotlib.pyplot
  import numpy
  import pandas
  import requests
label_desc: Use image node_id 23 for calling a global function with example usage: generate_profile_graph() without return types