code: def list_cases(args):
      cmd = python_cmd()
      cmd.extend(["-m", "test", "--list-cases"])
      cmd.extend(args.test_args)
      proc = subprocess.run(
          cmd, stdout=subprocess.PIPE, universal_newlines=True
      )
      exitcode = proc.returncode
      if exitcode:
          cmd = format_shell_args(cmd)
          print(
              "Failed to list tests: %s failed with exit code %s"
              % (cmd, exitcode)
          )
          sys.exit(exitcode)
      tests = proc.stdout.splitlines()
      return tests
  
file_path: cpython/Lib/test/bisect_cmd.py
imports: import argparse
  import datetime
  import os.path
  import math
  import random
  import subprocess
  import sys
  import tempfile
  import time
label_desc: Use image node_id 5 for calling a global function with example usage: list_cases(args) and returns: tests