code: def _display_jobs_hierarchy(jobs: Iterable[Job]) -> None:
      """displays jobs in a hierarchical format using experiment groups, container
      specs, and experiments"""
  
      xgroups = sorted(
          set([j.experiment.xgroup for j in jobs]), key=lambda x: x.id
      )
  
      for xg in xgroups:
          logging.info(f"xgroup {xg.name}:")
          xg_jobs = list(
              filter(lambda j: j.experiment.xgroup == xg, jobs)
          )
          container_specs = sorted(
              set([x.experiment.container_spec for x in xg_jobs]),
              key=lambda x: x.id,
          )
  
          for cs in container_specs:
              logging.info(f"docker config {_container_spec_str(cs)}")
              cs_jobs = list(
                  filter(
                      lambda j: (j.experiment.container_spec == cs),
                      xg_jobs,
                  )
              )
              experiments = sorted(
                  set([x.experiment for x in cs_jobs]),
                  key=lambda x: x.id,
              )
  
              for e in experiments:
                  logging.info(
                      f"  experiment id {e.id}: {_experiment_command_str(e)}"
                  )
                  exp_jobs = filter(
                      lambda x: x.experiment == e, cs_jobs
                  )
  
                  for j in exp_jobs:
                      logging.info(f"    job {_job_str(j)}")
  
          logging.info("")
  
imports: import logging
  import os
  from typing import Any, Dict, Iterable, List, Optional
  from sqlalchemy import or_
  from sqlalchemy.orm import Session
  from caliban.docker.build import build_image
  from caliban.docker.push import push_uuid_tag
  from caliban.history.submit import submit_job_specs
  from caliban.history.types import ContainerSpec, Experiment, ExperimentGroup, Job, JobStatus, Platform
  from caliban.history.util import get_gke_job_name, get_sql_engine, replace_job_spec_image, session_scope, stop_job, update_job_status
  from caliban.platform.gke.util import credentials, user_verify
  from caliban.util import Package, current_user
label_desc: Use image node_id 4 for calling a global function with example usage: _display_jobs_hierarchy(jobs) without return types