code: def extract_metrics(warm_up_lines):
      with open(execution_params["metric_log"]) as f:
          lines = f.readlines()
  
      click.secho(
          f"Dropping {warm_up_lines} warmup lines from log", fg="green"
      )
      lines = lines[warm_up_lines:]
  
      metrics = update_metrics()
  
      for k, v in metrics.items():
          all_lines = []
          pattern = re.compile(v)
          for line in lines:
              if pattern.search(line):
                  all_lines.append(
                      line.split("|")[0].split(":")[3].strip()
                  )
  
          out_fname = os.path.join(
              *(execution_params["tmp_dir"], "benchmark", k)
          )
          click.secho(
              f"\nWriting extracted {v} metrics to {out_fname} ",
              fg="green",
          )
          with open(out_fname, "w") as outf:
              all_lines = map(lambda x: x + "\n", all_lines)
              outf.writelines(all_lines)
  
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 19 for calling a global function with example usage: extract_metrics(warm_up_lines) without return types