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: filter workers that contain n_cpu CPUs at least
          
docstr_tok: ["filter","workers","that","contain","n_cpu","CPUs","at","least"]
code: def filter(self, n_cpu):
      """filter workers that contain n_cpu CPUs at least"""
      result = []
      for (
          worker_address,
          vacant_cpus,
      ) in self.worker_vacant_cpus.items():
          if vacant_cpus >= n_cpu:
              result.append(worker_address)
      return result
  
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 4 for calling the CpuResource obj's underlying member method code with example usage: obj.filter(n_cpu) and returns: result