code: def run_command(args: Namespace) -> None:
      config = ntsc.parse_config(
          args.config_file, args.entrypoint, args.config, args.volume
      )
      workspace_id = workspace.get_workspace_id_from_args(args)
      resp = ntsc.launch_command(
          args.master,
          "api/v1/commands",
          config,
          args.template,
          context_path=args.context,
          includes=args.include,
          workspace_id=workspace_id,
      )["command"]
  
      if args.detach:
          print(resp["id"])
          return
  
      render.report_job_launched("command", resp["id"])
  
      try:
          logs = api.task_logs(
              cli.setup_session(args), resp["id"], follow=True
          )
          api.pprint_logs(logs)
      finally:
          print(
              colored(
                  "Task log stream ended. To reopen log stream, run: "
                  "det task logs -f {}".format(resp["id"]),
                  "green",
              )
          )
  
file_path: determined/harness/determined/cli/command.py
imports: from argparse import ONE_OR_MORE, REMAINDER, FileType, Namespace
  from functools import partial
  from pathlib import Path
  from termcolor import colored
  from determined import cli
  from determined.cli import ntsc, render, task, workspace
  from determined.common import api
  from determined.common.api import authentication
  from determined.common.declarative_argparse import Arg, ArgsDescription, Cmd, Group
label_desc: Use image node_id 1 for calling a global function with example usage: run_command(args) without return types