code: def get_command_config(command_type: str, task_id: str) -> str:
      assert command_type in ["command", "notebook", "shell"]
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          command_type,
          "config",
          task_id,
      ]
      env = os.environ.copy()
      env["DET_DEBUG"] = "true"
      completed_process = subprocess.run(
          command,
          universal_newlines=True,
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
          env=env,
      )
      assert (
          completed_process.returncode == 0
      ), "\nstdout:\n{} \nstderr:\n{}".format(
          completed_process.stdout, completed_process.stderr
      )
      return str(completed_process.stdout)
  
file_path: determined/e2e_tests/tests/command/command.py
imports: import os
  import re
  import subprocess
  from contextlib import contextmanager
  from typing import IO, Any, Iterator, Optional
  import requests
  from determined.common import api
  from determined.common.api import authentication, certs, task_logs
  from tests import api_utils
  from tests import config
label_desc: Use image node_id 4 for calling a global function with example usage: get_command_config(command_type, task_id) and returns: str