code: func FilteredBy(pred ResourcePredicate, rls []*metav1.APIResourceList) []*metav1.APIResourceList {
  	result := []*metav1.APIResourceList{}
  	for _, rl := range rls {
  		filtered := *rl
  		filtered.APIResources = nil
  		for i := range rl.APIResources {
  			if pred.Match(rl.GroupVersion, &rl.APIResources[i]) {
  				filtered.APIResources = append(filtered.APIResources, rl.APIResources[i])
  			}
  		}
  		if filtered.APIResources != nil {
  			result = append(result, &filtered)
  		}
  	}
  	return result
  }
docs: // FilteredBy filters by the given predicate. Empty APIResourceLists are dropped.