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: add GPU resource to worker_vacant_gpus
  Args:
      allocated_gpu (AllocatedGpu): Record the GPU resource used in a job.
docstr_tok: ["add","GPU","resource","to","worker_vacant_gpus","Args",":","allocated_gpu","(","AllocatedGpu",")",":","Record","the","GPU","resource","used","in","a","job","."]
code: def add_gpu(self, worker_address, allocated_gpu):
      """add GPU resource to worker_vacant_gpus
      Args:
          allocated_gpu (AllocatedGpu): Record the GPU resource used in a job.
      """
      if allocated_gpu.gpu:
          self.worker_vacant_gpus[worker_address].extend(
              allocated_gpu.gpu.split(",")
          )
  
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 2 for calling the GpuResource obj's underlying member method code with example usage: obj.add_gpu(worker_address, allocated_gpu) without return types