code: def get_job_time(workflow_run_id):
      """Extract time info for all jobs in a GitHub Actions workflow run"""
  
      url = f"https://api.github.com/repos/huggingface/transformers/actions/runs/{workflow_run_id}/jobs?per_page=100"
      result = requests.get(url).json()
      job_time = {}
  
      try:
          job_time.update(
              {
                  job["name"]: extract_time_from_single_job(job)
                  for job in result["jobs"]
              }
          )
          pages_to_iterate_over = math.ceil(
              (result["total_count"] - 100) / 100
          )
  
          for i in range(pages_to_iterate_over):
              result = requests.get(url + f"&page={i + 2}").json()
              job_time.update(
                  {
                      job["name"]: extract_time_from_single_job(job)
                      for job in result["jobs"]
                  }
              )
  
          return job_time
      except Exception as e:
          print("Unknown error, could not fetch links.", e)
  
      return {}
  
imports: import argparse
  import math
  import dateutil.parser
  import requests
label_desc: Use image node_id 2 for calling a global function with example usage: get_job_time(workflow_run_id) and returns: dict, job_time