code: def filter(self, resource_manager, **params):
          
          m = self.resolve(resource_manager.resource_type)
          client = resource_manager.get_client()
  
          enum_op, list_op, extra_args = m.enum_spec
  
          parent_type, annotate_parent = m.parent_spec
          parents = self.manager.get_resource_manager(parent_type)
  
          # Have to query separately for each parent's children.
          results = []
          for parent in parents.resources():
              if extra_args:
                  params.update({key: parent[extra_args[key]] for key in extra_args.keys()})
  
              op = getattr(getattr(client, enum_op), list_op)
              subset = [r.serialize(True) for r in op(**params)]
  
              if annotate_parent:
                  for r in subset:
                      r[self.parent_key] = parent[parents.resource_type.id]
  
              if subset:
                  results.extend(subset)
          return results
docs: Query a set of resources.