code: def select_device_by_load(wproc=0.5, wmem=0.5):
      
  
      ids = device_by_load(wproc=wproc, wmem=wmem)
      cp.cuda.Device(ids[0]).use()
      return ids[0]
docs: Set the current device for cupy as the device with the lowest
      weighted average of processor and memory load.