code: def device_by_load(wproc=0.5, wmem=0.5):
      
  
      gl = gpu_load(wproc=wproc, wmem=wmem)
      # return np.argsort(np.asarray(gl)[:, -1]).tolist()
      return [idx for idx, load in sorted(enumerate(
          [g.weighted for g in gl]), key=(lambda x: x[1]))]
docs: Get a list of GPU device ids ordered by increasing weighted
      average of processor and memory load.