code: def _container_spec_str(cs: ContainerSpec) -> str:
      """returns container spec string for cli commands"""
      build_path = cs.spec.get("build_path")
      if build_path is not None:
          build_path = build_path.replace(os.path.expanduser("~"), "~")
      return (
          f'{cs.id}: job_mode: {cs.spec.get("job_mode", "GPU")}, '
          f"build url: {build_path}, "
          f'extra dirs: {cs.spec.get("extra_dirs")}'
      )
  
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 3 for calling a global function with example usage: _container_spec_str(cs) and returns: cs, str, cs, str, build_path, str, cs