code: def main(
      cli_profile,
      workflow_definition,
      repos_path,
      repos_url,
      branch,
      dockerhub_password,
  ):
      click.echo("cli_profile = " + cli_profile)
      click.echo("workflow_definition = " + workflow_definition)
      repos_path = f"{repos_path}_{str(datetime.now().microsecond)}/"
      click.echo("repos_path = " + repos_path)
      click.echo("repos_url = " + repos_url)
      click.echo("branch = " + branch)
      identifier = str(uuid.uuid4())
      with open(workflow_definition, "r") as f:
          jobs_json = json.loads(
              f.read()
              % {
                  "repos_path": repos_path,
                  "dockerhub_password": dockerhub_password,
              }
          )
  
      print(f"Importing source files from Glow repo")
      run_cli_cmd(cli_profile, "workspace", ["mkdirs", repos_path])
      run_cli_cmd(
          cli_profile,
          "repos",
          [
              "create",
              "--url",
              repos_url,
              "--provider",
              "gitHub",
              "--path",
              repos_path + "glow",
          ],
      )
      run_cli_cmd(
          cli_profile,
          "repos",
          ["update", "--branch", branch, "--path", repos_path + "glow"],
      )
  
      print(f"Create job")
      job_create = run_cli_cmd(
          cli_profile,
          "jobs",
          ["create", "--json", json.dumps(jobs_json)],
      )
      job_id = str(json.loads(job_create)["job_id"])
      print(f"Run job")
      job_run = run_cli_cmd(
          cli_profile, "jobs", ["run-now", "--job-id", job_id]
      )
      run_id = str(json.loads(job_run)["run_id"])
      print(f"Check job status")
      run_get = run_cli_cmd(
          cli_profile, "runs", ["get", "--run-id", run_id]
      )
      run_info = json.loads(run_get)
      while True:
          run_get = run_cli_cmd(
              cli_profile, "runs", ["get", "--run-id", run_id]
          )
          run_info = json.loads(run_get)
          print(
              f"=== Status check at {datetime.now().strftime('%H:%M:%S')} ==="
          )
          base_msg = (
              f"(Run ID [{run_info['state']['life_cycle_state']}]"
          )
          if run_info["state"]["life_cycle_state"] == "INTERNAL_ERROR":
              print(
                  base_msg,
                  run_info["state"]["result_state"],
                  run_info["run_page_url"],
                  ")",
              )
              print("====================================")
              print("|  Exiting due to internal error.  |")
              print("====================================")
              run_cli_cmd(
                  cli_profile,
                  "repos",
                  ["delete", "--path", repos_path + "glow"],
              )
              run_cli_cmd(
                  cli_profile, "workspace", ["delete", repos_path]
              )
              sys.exit(1)
          if run_info["state"]["life_cycle_state"] == "TERMINATED":
              print(
                  base_msg,
                  run_info["state"]["result_state"],
                  run_info["run_page_url"],
                  ")",
              )
              if run_info["state"]["result_state"] == "FAILED":
                  print("===========================")
                  print("|    Some tasks failed.    |")
                  print("============================")
                  run_cli_cmd(
                      cli_profile,
                      "repos",
                      ["delete", "--path", repos_path + "glow"],
                  )
                  run_cli_cmd(
                      cli_profile, "workspace", ["delete", repos_path]
                  )
                  sys.exit(1)
              else:
                  if run_info["state"]["result_state"] == "SUCCESS":
                      print("===========================")
                      print("|   All tasks succeeded!   |")
                      print("============================")
                      run_cli_cmd(
                          cli_profile,
                          "repos",
                          ["delete", "--path", repos_path + "glow"],
                      )
                      run_cli_cmd(
                          cli_profile,
                          "workspace",
                          ["delete", repos_path],
                      )
                      sys.exit(0)
          else:
              print(base_msg, run_info["state"]["state_message"], ")")
          time.sleep(60)
  
file_path: glow/docs/dev/run-nb-test.py
imports: import click
  from datetime import datetime
  import glob
  import json
  import os
  import subprocess
  import sys
  import time
  import uuid
label_desc: Use image node_id 2 for calling a global function with example usage: main(cli_profile, workflow_definition, repos_path, repos_url, branch, dockerhub_password) without return types