code: def _get_rocm_gpus() -> List[GPU]:
      try:
          output_json = subprocess.run(
              [
                  "rocm-smi",
                  "--showid",
                  "--showuniqueid",
                  "--json",
              ],
              check=True,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE,
          ).stdout
  
      except FileNotFoundError:
          logger.info("rocm-smi not found")
          return []
      except Exception as e:
          logger.warning(f"rocm-smi error: {e}")
          return []
  
      try:
          output = json.loads(output_json)
      except Exception as e:
          logger.warning(
              f"failed to parse rocm-smi json output: {e}, content: {str(output_json)}"
          )
          return []
  
      gpus = []
      for k, v in output.items():
          gpus.append(
              GPU(
                  id=int(k[len("card") :]),
                  uuid=v["Unique ID"],
                  load=0,
                  memoryUtil=0,
              )
          )
  
      logger.info(f"detected {len(gpus)} rocm gpus")
      return gpus
  
file_path: determined/harness/determined/gpu.py
imports: import csv
  import json
  import logging
  import subprocess
  from typing import List, NamedTuple, Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: _get_rocm_gpus() and returns: gpus, list, list, list