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: deadletter.go
    path of file: ./repos/protoactor-go/actor
    
    the code of the file until where you have to start completion: package actor

import (
	"context"
	"fmt"
	"log/slog"
	"strings"

	"github.com/asynkron/protoactor-go/metrics"
	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/metric"
)

type deadLetterProcess struct {
	actorSystem *ActorSystem
}

var _ Process = &deadLetterProcess{}

func NewDeadLetter(actorSystem *ActorSystem) *deadLetterProcess {
	dp := &deadLetterProcess{
		actorSystem: actorSystem,
	}

	shouldThrottle := NewThrottle(actorSystem.Config.DeadLetterThrottleCount, actorSystem.Config.DeadLetterThrottleInterval, func(i int32) {
		actorSystem.Logger().Info("[DeadLetter]", slog.Int64("throttled", int64(i)))
	})

	actorSystem.ProcessRegistry.Add(dp, "deadletter")
	_ = actorSystem.EventStream.Subscribe(func(msg interface{}) {
		if deadLetter, ok := msg.(*DeadLetterEvent); ok {

			// send back a response instead of timeout.
			if deadLetter.Sender != nil {
				actorSystem.Root.Send(deadLetter.Sender, &DeadLetterResponse{})
			}

			// bail out if sender is set and deadletter request logging is false
			if !actorSystem.Config.DeadLetterRequestLogging && deadLetter.Sender != nil {
				return
			}

			if _,
    
func NewDeadLetter(actorSystem *ActorSystem) *deadLetterProcess {
	dp := &deadLetterProcess{
		actorSystem: actorSystem,
	}

	shouldThrottle := NewThrottle(actorSystem.Config.DeadLetterThrottleCount, actorSystem.Config.DeadLetterThrottleInterval, func(i int32) {
		actorSystem.Logger().Info("[DeadLetter]", slog.Int64("throttled", int64(i)))
	})

	actorSystem.ProcessRegistry.Add(dp, "deadletter")
	_ = actorSystem.EventStream.Subscribe(func(msg interface{}) {
		if deadLetter, ok := msg.(*DeadLetterEvent); ok {

			// send back a response instead of timeout.
			if deadLetter.Sender != nil {
				actorSystem.Root.Send(deadLetter.Sender, &DeadLetterResponse{})
			}

			// bail out if sender is set and deadletter request logging is false
			if !actorSystem.Config.DeadLetterRequestLogging && deadLetter.Sender != nil {
				return
			}

			if _, isIgnoreDeadLetter := deadLetter.Message.(IgnoreDeadLetterLogging); !isIgnoreDeadLetter {
				if shouldThrottle() == Open {
					actorSystem.Logger().Debug("[DeadLetter]", slog.Any("pid", deadLetter.PID), slog.Any("message", deadLetter.Message), slog.Any("sender", deadLetter.Sender))
				}
			}
		}
	})

	// this subscriber may not be deactivated.
	// it ensures that Watch commands that reach a stopped actor gets a Terminated message back.
	// This can happen if one actor tries to Watch a PID, while another thread sends a Stop message.
	actorSystem.EventStream.Subscribe(func(msg interface{}) {
		if deadLetter, ok := msg.(*DeadLetterEvent); ok {
			if m, ok := deadLetter.Message.(*Watch); ok {
				// we know that this is a local actor since we get it on our own event stream, thus the address is not terminated
				m.Watcher.sendSystemMessage(actorSystem, &Terminated{
					Who: deadLetter.PID,
					Why: TerminatedReason_NotFound,
				})
			}
		}
	})

	return dp
}