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: bipartitegraph.go
    path of file: ./repos/plumber/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph
    
    the code of the file until where you have to start completion: package bipartitegraph

import "fmt"

import . "github.com/onsi/gomega/matchers/support/goraph/node"
import . "github.com/onsi/gomega/matchers/support/goraph/edge"

type BipartiteGraph struct {
	Left  NodeOrderedSet
	Right NodeOrderedSet
	Edges EdgeSet
}

func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) 
    
func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) {
	left := NodeOrderedSet{}
	for i, v := range leftValues {
		left = append(left, Node{ID: i, Value: v})
	}

	right := NodeOrderedSet{}
	for j, v := range rightValues {
		right = append(right, Node{ID: j + len(left), Value: v})
	}

	edges := EdgeSet{}
	for i, leftValue := range leftValues {
		for j, rightValue := range rightValues {
			neighbours, err := neighbours(leftValue, rightValue)
			if err != nil {
				return nil, fmt.Errorf("error determining adjacency for %v and %v: %s", leftValue, rightValue, err.Error())
			}

			if neighbours {
				edges = append(edges, Edge{Node1: left[i].ID, Node2: right[j].ID})
			}
		}
	}

	return &BipartiteGraph{left, right, edges}, nil
}