code: def make_vres_vdev(i0=0, i1=-1):
      "return vectors of device ids and resources useful for gpu_multiple"
      vres = faiss.GpuResourcesVector()
      vdev = faiss.IntVector()
      if i1 == -1:
          i1 = ngpu
      for i in range(i0, i1):
          vdev.push_back(i)
          vres.push_back(gpu_resources[i])
      return vres, vdev
  
imports: from __future__ import print_function
  import numpy
  import time
  import os
  import sys
  import faiss
  import re
  from multiprocessing.pool import ThreadPool
  from datasets import ivecs_read
label_desc: Use image node_id 8 for calling a global function with example usage: make_vres_vdev(i0, i1) and returns: vres,  vdev