code: def get_trial_stats(trial_jobs_url):
      trial_jobs = requests.get(trial_jobs_url).json()
      trial_stats = collections.defaultdict(int)
      for trial_job in trial_jobs:
          trial_stats[trial_job["status"]] += 1
      return trial_stats
  
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 12 for calling a global function with example usage: get_trial_stats(trial_jobs_url) and returns: trial_stats