code: def jobs(running):
      account = ServiceAccount()
      cloudml = account.cloud_service("ml")
      request = (
          cloudml.projects()
          .jobs()
          .list(parent="projects/{}".format(account.project_id))
      )
  
      try:
          response = request.execute()
          jobs = response["jobs"]
  
          if not jobs:
              click.echo("There are no jobs for this project.")
              return
  
          if running:
              jobs = [j for j in jobs if j["state"] == "RUNNING"]
              if not jobs:
                  click.echo("There are no running jobs.")
                  return
  
          for job in jobs:
              click.echo(
                  "Id: {} Created: {} State: {}".format(
                      job["jobId"], job["createTime"], job["state"]
                  )
              )
      except Exception as err:
          click.echo(
              "There was an error fetching jobs. "
              "Check the details: \n{}".format(err._get_reason()),
              err=True,
          )
  
imports: import click
  import json
  import luminoth
  import os
  import shutil
  import subprocess
  import sys
  import tempfile
  import tensorflow
  import time
  from datetime import datetime
  from functools import wraps
  from luminoth.utils.config import get_config, dump_config
  from luminoth.utils.experiments import save_run
label_desc: Use image node_id 8 for calling a global function with example usage: jobs(running) without return types