code: def get_gpu_info(run_lambda):
      if get_platform() == "darwin" or (
          TORCH_AVAILABLE
          and hasattr(torch.version, "hip")
          and torch.version.hip is not None
      ):
          if TORCH_AVAILABLE and torch.cuda.is_available():
              if torch.version.hip is not None:
                  prop = torch.cuda.get_device_properties(0)
                  if hasattr(prop, "gcnArchName"):
                      gcnArch = " ({})".format(prop.gcnArchName)
                  else:
                      gcnArch = "NoGCNArchNameOnOldPyTorch"
              else:
                  gcnArch = ""
              return torch.cuda.get_device_name(None) + gcnArch
          return None
      smi = get_nvidia_smi()
      uuid_regex = re.compile(r" \(UUID: .+?\)")
      rc, out, _ = run_lambda(smi + " -L")
      if rc != 0:
          return None
      # Anonymize GPUs by removing their UUID
      return re.sub(uuid_regex, "", out)
  
imports: import datetime
  import locale
  import re
  import subprocess
  import sys
  import os
  from collections import namedtuple
label_desc: Use image node_id 10 for calling a global function with example usage: get_gpu_info(run_lambda) and returns: re, None, None, unknown