code: def _fetch_slots() -> List[Dict[str, Any]]:
      command = [
          "det",
          "-m",
          conf.make_master_url(),
          "slot",
          "list",
          "--json",
      ]
      output = subprocess.check_output(command).decode()
      slots = cast(List[Dict[str, str]], json.loads(output))
      return slots
  
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 2 for calling a global function with example usage: _fetch_slots() and returns: slots