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: processor_load_balancer.go
    path of file: ./repos/azure-sdk-for-go/sdk/messaging/azeventhubs
    
    the code of the file until where you have to start completion: // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package azeventhubs

import (
	"context"
	"fmt"
	"math"
	"math/rand"
	"strings"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/internal/log"
)

type processorLoadBalancer struct 
    
func (lb *processorLoadBalancer) LoadBalance(ctx context.Context, partitionIDs []string) ([]Ownership, error) {
	lbinfo, err := lb.getAvailablePartitions(ctx, partitionIDs)

	if err != nil {
		return nil, err
	}

	ownerships := lbinfo.current

	if lbinfo.claimMorePartitions {
		switch lb.strategy {
		case ProcessorStrategyGreedy:
			log.Writef(EventConsumer, "[%s] Using greedy strategy to claim partitions", lb.details.ClientID)
			ownerships = lb.greedyLoadBalancer(ctx, lbinfo)
		case ProcessorStrategyBalanced:
			log.Writef(EventConsumer, "[%s] Using balanced strategy to claim partitions", lb.details.ClientID)
			o := lb.balancedLoadBalancer(ctx, lbinfo)

			if o != nil {
				ownerships = append(lbinfo.current, *o)
			}
		default:
			return nil, fmt.Errorf("[%s] invalid load balancing strategy '%s'", lb.details.ClientID, lb.strategy)
		}
	}

	actual, err := lb.checkpointStore.ClaimOwnership(ctx, ownerships, nil)

	if err != nil {
		return nil, err
	}

	if log.Should(EventConsumer) {
		log.Writef(EventConsumer, "[%0.5s] Asked for %s, got %s", lb.details.ClientID, partitionsForOwnerships(ownerships), partitionsForOwnerships(actual))
	}

	return actual, nil
}