code: def _list(args, cli_args):
      with model.get_db_provider(cli_args.config) as db:
          if len(args) == 0:
              experiments = db.get_user_experiments()
          elif args[0] == "project":
              assert len(args) == 2
              experiments = db.get_project_experiments(args[1])
          elif args[0] == "users":
              assert len(args) == 1
              users = db.get_users()
              for u in users:
                  print(users[u].get("email"))
              return
          elif args[0] == "user":
              assert len(args) == 2
              users = db.get_users()
              user_ids = [
                  u for u in users if users[u].get("email") == args[1]
              ]
              assert len(user_ids) == 1, (
                  "The user with email " + args[1] + "not found!"
              )
              experiments = db.get_user_experiments(user_ids[0])
          elif args[0] == "all":
              assert len(args) == 1
              users = db.get_users()
              experiments = []
              for u in users:
                  experiments += db.get_user_experiments(u)
          else:
              get_logger().critical("Unknown command " + args[0])
              return
  
          if cli_args.short:
              for e in experiments:
                  print(e)
              return
  
          experiments = [db.get_experiment(e) for e in experiments]
  
      experiments.sort(key=lambda e: -e.time_added)
      table = [["Time added", "Key", "Project", "Status"]]
  
      for e in experiments:
          table.append(
              [
                  time.strftime(
                      "%Y-%m-%d %H:%M:%S", time.localtime(e.time_added)
                  ),
                  e.key,
                  e.project,
                  e.status,
              ]
          )
  
      print(AsciiTable(table).table)
  
file_path: studio/studio/cli.py
imports: import argparse
  import sys
  import time
  from terminaltables import AsciiTable
  from studio import model
  from studio.util import logs
label_desc: Use image node_id 3 for calling a global function with example usage: _list(args, cli_args) without return types