code: def _task_data(task_id: str) -> Optional[Dict[str, Any]]:
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          "task",
          "list",
          "--json",
      ]
      tasks_data: Dict[str, Dict[str, Any]] = json.loads(
          subprocess.check_output(command).decode()
      )
      matches = [
          t for t in tasks_data.values() if t["taskId"] == task_id
      ]
      return matches[0] if matches else None
  
imports: import contextlib
  import json
  import subprocess
  import time
  from typing import Any, Dict, Iterator, List, Optional, cast
  import pytest
  from determined.common.api.bindings import experimentv1State, get_GetSlot
  from tests import api_utils
  from tests import config
  from tests import experiment
  from .test_users import logged_in_user
  from .utils import assert_command_succeeded, run_zero_slot_command, wait_for_command_state
label_desc: Use image node_id 9 for calling a global function with example usage: _task_data(task_id) and returns: unknown