code: func (e *Store) ListPredicate(ctx context.Context, p storage.SelectionPredicate, options *metainternalversion.ListOptions) (runtime.Object, error) {
  	if options == nil {
  		// By default we should serve the request from etcd.
  		options = &metainternalversion.ListOptions{ResourceVersion: ""}
  	}
  	p.Limit = options.Limit
  	p.Continue = options.Continue
  	list := e.NewListFunc()
  	qualifiedResource := e.qualifiedResourceFromContext(ctx)
  	if name, ok := p.MatchesSingle(); ok {
  		if key, err := e.KeyFunc(ctx, name); err == nil {
  			err := e.Storage.GetToList(ctx, key, options.ResourceVersion, p, list)
  			return list, storeerr.InterpretListError(err, qualifiedResource)
  		}
  		// if we cannot extract a key based on the current context, the optimization is skipped
  	}
  
  	err := e.Storage.List(ctx, e.KeyRootFunc(ctx), options.ResourceVersion, p, list)
  	return list, storeerr.InterpretListError(err, qualifiedResource)
  }
docs: // ListPredicate returns a list of all the items matching the given
  // SelectionPredicate.