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