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: "Return the number vacant of CPUs of all the workers.
docstr_tok: ["``","Return","the","number","vacant","of","CPUs","of","all","the","workers","."]
code: def cpu_num(self):
      """ "Return the number vacant of CPUs of all the workers."""
      return sum(self.worker_vacant_cpus.values())
  
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 8 for calling the CpuResource obj's underlying member method code with example usage: obj.cpu_num() and returns: sum