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_stress_tester.go
    path of file: ./repos/azure-sdk-for-go/sdk/messaging/azeventhubs/internal/eh/stress/tests
    
    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 tests

import (
	"context"
	"errors"
	"flag"
	"fmt"
	"log"
	"math"
	"os"
	"strconv"
	"strings"
	"sync"
	"time"

	"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
	"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"
)

func ProcessorStressTeste
    
func (inf *processorStressTest) report(ctx context.Context, header string, endPositions []azeventhubs.PartitionProperties) (string, bool, error) {
	ownerships, err := inf.checkpointStore.ListOwnership(ctx, inf.Namespace, inf.HubName, azeventhubs.DefaultConsumerGroup, nil)

	if err != nil {
		return "", false, err
	}

	checkpoints, err := inf.checkpointStore.ListCheckpoints(ctx, inf.Namespace, inf.HubName, azeventhubs.DefaultConsumerGroup, nil)

	if err != nil {
		return "", false, err
	}

	ownershipMap := sliceToMap(ownerships, func(v azeventhubs.Ownership) string { return v.PartitionID })
	checkpointsMap := sliceToMap(checkpoints, func(v azeventhubs.Checkpoint) string { return v.PartitionID })

	stats := strings.Builder{}

	stats.WriteString(fmt.Sprintf("=== Stats (%s) ===\n", header))

	done := 0

	// iterate over all partitions, noting if they are unowned, how far we've gotten into the partitions, etc...
	for _, endProps := range endPositions {
		owner := "none"
		lastUpdate := ""

		o, exists := ownershipMap[endProps.PartitionID]

		if exists {
			owner = string(o.OwnerID[0:5])
			lastUpdate = o.LastModifiedTime.Format(time.RFC3339)
		}

		cp, exists := checkpointsMap[endProps.PartitionID]

		remaining := int64(-1)

		if exists {
			remaining = endProps.LastEnqueuedSequenceNumber - *cp.SequenceNumber
		}

		if remaining == 0 {
			done++
		}

		stats.WriteString(fmt.Sprintf("  [%s] o:%s (last: %s), remaining: %d/%d\n", endProps.PartitionID, owner, lastUpdate, remaining, inf.eventsPerRound))
	}

	return stats.String(), done == len(endPositions), nil
}