code: def get_freer_gpu():
      os.system(
          "nvidia-smi -q -d Memory |grep -A4 GPU|grep Free >tmp_smi"
      )
      memory_available = [
          int(x.split()[2]) + 5 * i
          for i, x in enumerate(open("tmp_smi", "r").readlines())
      ]
      os.remove("tmp_smi")
      return np.argmax(memory_available)
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/metrics/summac/utils_misc.py
imports: import numpy
  import tqdm
  import os
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: get_freer_gpu() and returns: np