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: ds_writer.go
    path of file: ./repos/tracee/tests/e2e-inst-signatures/scripts/ds_writer
    
    the code of the file until where you have to start completion: package main

import (
	"context"
	"flag"
	"fmt"
	"math/rand"
	"os"

	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials/insecure"
	"google.golang.org/protobuf/types/known/structpb"

	"github.com/aquasecurity/tracee/api/v1beta1"
)

func printAndExit(msg string, args ...any) {
	fmt.Printf(msg, args...)
	os.Exit(1)
}

func chooseWord(list []string) string {
	return list[rand.Intn(len(list))]
}

func contaminate(client v1beta1.DataSourceServiceClient) error {
	stream, err := client.WriteStream(context.Background())
	if err != nil {
		ret
    
func contaminate(client v1beta1.DataSourceServiceClient) error {
	stream, err := client.WriteStream(context.Background())
	if err != nil {
		return fmt.Errorf("error establishing stream: %v", err)
	}
	for i := 0; i < 1000; i++ {
		randomKey := chooseWord(wordList)
		randomValue := chooseWord(wordList)
		err := stream.Send(&v1beta1.WriteDataSourceRequest{
			Id:        "demo",
			Namespace: "e2e_inst",
			Key:       structpb.NewStringValue(randomKey),
			Value:     structpb.NewStringValue(randomValue),
		})
		if err != nil {
			return err
		}
	}
	_, err = stream.CloseAndRecv()
	if err != nil {
		return fmt.Errorf("error closing stream: %v", err)
	}
	return nil
}