class_docstr: Record CPU information in each worker and respond to resource allocation of CPUs.
  
  Attributes:
      worker_vacant_cpus (dict): Record how many vacant cpus does each
                                 worker has.
      worker_used_cpus (dict): Record how many used cpus does each
                                 worker has.
class_docstr_tok: ["Record","CPU","information","in","each","worker","and","respond","to","resource","allocation","of","CPUs",".","Attributes",":","worker_vacant_cpus","(","dict",")",":","Record","how","many","vacant","cpus","does","each","worker","has",".","worker_used_cpus","(","dict",")",":","Record","how","many","used","cpus","does","each","worker","has","."]
docstr: add CPU resource to worker_vacant_cpus
  Args:
      allocated_cpu (AllocatedCpu): Record the CPU resource used in a job.
docstr_tok: ["add","CPU","resource","to","worker_vacant_cpus","Args",":","allocated_cpu","(","AllocatedCpu",")",":","Record","the","CPU","resource","used","in","a","job","."]
code: def add_cpu(self, worker_address, allocated_cpu):
      """add CPU resource to worker_vacant_cpus
      Args:
          allocated_cpu (AllocatedCpu): Record the CPU resource used in a job.
      """
      self.worker_vacant_cpus[worker_address] += allocated_cpu.n_cpu
  
file_path: PARL/parl/remote/cpu_resource.py
imports: from collections import defaultdict
  from parl.remote.message import AllocatedCpu
label_desc: Use image node_id 2 for calling the CpuResource obj's underlying member method code with example usage: obj.add_cpu(worker_address, allocated_cpu) without return types