class_docstr: Record GPU information in each worker and respond to resource allocation of GPUs.
  
  Attributes:
      worker_vacant_gpus (dict): Record how many vacant gpus does each
                                 worker has.
      worker_used_gpus (dict): Record how many used gpus does each
                                 worker has.
class_docstr_tok: ["Record","GPU","information","in","each","worker","and","respond","to","resource","allocation","of","GPUs",".","Attributes",":","worker_vacant_gpus","(","dict",")",":","Record","how","many","vacant","gpus","does","each","worker","has",".","worker_used_gpus","(","dict",")",":","Record","how","many","used","gpus","does","each","worker","has","."]
docstr: Return the number of vacant GPUs in the worker.
docstr_tok: ["Return","the","number","of","vacant","GPUs","in","the","worker","."]
code: def get_vacant_gpu(self, worker_address):
      """Return the number of vacant GPUs in the worker."""
      return sum(
          [len(gpu) for gpu in self.worker_vacant_gpus[worker_address]]
      )
  
file_path: PARL/parl/remote/gpu_resource.py
imports: from collections import defaultdict
  from parl.remote.message import AllocatedGpu
label_desc: Use image node_id 7 for calling the GpuResource obj's underlying member method code with example usage: obj.get_vacant_gpu(worker_address) and returns: sum