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: eplfs.go
    path of file: ./repos/rclone/backend/union/policy
    
    the code of the file until where you have to start completion: package policy

import (
	"context"
	"errors"
	"math"

	"github.com/rclone/rclone/backend/union/upstream"
	"github.com/rclone/rclone/fs"
)

func init() {
	registerPolicy("eplfs", &EpLfs{})
}

// EpLfs stands for existing path, least free space
// Of all the candidates on which the path exists choose the one with the least free space.
type EpLfs struct {
	EpAll
}

var errNoUpstreamsFound = errors.New("no upstreams found with more than min_free_space space spare
    
func (p *EpLfs) lfs(upstreams []*upstream.Fs) (*upstream.Fs, error) {
	var minFreeSpace int64 = math.MaxInt64
	var lfsupstream *upstream.Fs
	for _, u := range upstreams {
		space, err := u.GetFreeSpace()
		if err != nil {
			fs.LogPrintf(fs.LogLevelNotice, nil,
				"Free Space is not supported for upstream %s, treating as infinite", u.Name())
		}
		if space < minFreeSpace && space > int64(u.Opt.MinFreeSpace) {
			minFreeSpace = space
			lfsupstream = u
		}
	}
	if lfsupstream == nil {
		return nil, errNoUpstreamsFound
	}
	return lfsupstream, nil
}