You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: matchfunction.go
    path of file: ./repos/open-match/pkg/matchfunction
    
    the code of the file until where you have to start completion: // Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissi
    
func QueryBackfillPools(ctx context.Context, queryClient pb.QueryServiceClient, pools []*pb.Pool, opts ...grpc.CallOption) (map[string][]*pb.Backfill, error) {
	ctx, cancel := context.WithCancel(ctx)
	defer cancel()
	type result struct {
		err       error
		backfills []*pb.Backfill
		name      string
	}

	results := make(chan result)
	for _, pool := range pools {
		go func(pool *pb.Pool) {
			r := result{
				name: pool.Name,
			}
			r.backfills, r.err = QueryBackfillPool(ctx, queryClient, pool, opts...)

			select {
			case results <- r:
			case <-ctx.Done():
			}
		}(pool)
	}

	poolMap := make(map[string][]*pb.Backfill)
	for i := 0; i < len(pools); i++ {
		select {
		case <-ctx.Done():
			return nil, fmt.Errorf("context canceled while querying pools: %w", ctx.Err())
		case r := <-results:
			if r.err != nil {
				return nil, r.err
			}

			poolMap[r.name] = r.backfills
		}
	}

	return poolMap, nil
}