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: persist.go
    path of file: ./repos/plumber/vendor/github.com/Azure/azure-event-hubs-go/v3/persist
    
    the code of the file until where you have to start completion: // Package persist provides abstract structures for checkpoint persistence.
package persist

import (
	"path"
	"sync"
)

type (
	// CheckpointPersister provides persistence for the received offset for a given na
    
func (p *MemoryPersister) Read(namespace, name, consumerGroup, partitionID string) (Checkpoint, error) {
	p.mu.Lock()
	defer p.mu.Unlock()

	key := getPersistenceKey(namespace, name, consumerGroup, partitionID)
	if offset, ok := p.values[key]; ok {
		return offset, nil
	}
	return NewCheckpointFromStartOfStream(), nil
}