code: def get_trial_jobs(trial_jobs_url, status=None):
      """Return failed trial jobs"""
      trial_jobs = requests.get(trial_jobs_url).json()
      res = []
      for trial_job in trial_jobs:
          if status is None or trial_job["status"] == status:
              res.append(trial_job)
      return res
  
imports: import contextlib
  import collections
  import os
  import socket
  import sys
  import subprocess
  import requests
  import time
  import yaml
  import shlex
  import warnings
label_desc: Use image node_id 13 for calling a global function with example usage: get_trial_jobs(trial_jobs_url, status) and returns: res