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: graphql.go
    path of file: ./repos/go-ethereum/graphql
    
    the code of the file until where you have to start completion: // Copyright 2019 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public Licens
    
func (b *Block) Logs(ctx context.Context, args struct{ Filter BlockFilterCriteria }) ([]*Log, error) {
	var addresses []common.Address
	if args.Filter.Addresses != nil {
		addresses = *args.Filter.Addresses
	}
	var topics [][]common.Hash
	if args.Filter.Topics != nil {
		topics = *args.Filter.Topics
	}
	// Construct the range filter
	hash, err := b.Hash(ctx)
	if err != nil {
		return nil, err
	}
	filter := b.r.filterSystem.NewBlockFilter(hash, addresses, topics)

	// Run the filter and return all the logs
	return runFilter(ctx, b.r, filter)
}