code: def cli(
      tests=None,
      contexts=None,
      graphs=None,
      num_parallel=None,
      debug=False,
      inherit_env=False,
  ):
      parse = lambda x: {t.lower() for t in x.split(",") if t}
  
      failed = run_all(
          parse(tests),
          parse(contexts),
          parse(graphs),
          debug,
          num_parallel,
          inherit_env,
      )
  
      if failed:
          log("The following tests failed:")
          for fail, path in failed:
              if debug:
                  log("%s (path %s)" % (fail, path), real_bad=True)
              else:
                  log(fail, real_bad=True)
          sys.exit(1)
      else:
          log("All tests were successful!", real_good=True)
          sys.exit(0)
  
imports: import sys
  import os
  import json
  import uuid
  import glob
  import importlib
  import tempfile
  import shutil
  import subprocess
  from multiprocessing import Pool
  from metaflow._vendor import click
  from metaflow_test import MetaflowTest
  from metaflow_test.formatter import FlowFormatter
label_desc: Use image node_id 7 for calling a global function with example usage: cli(tests, contexts, graphs, num_parallel, debug, inherit_env) without return types