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: partition_list.go
    path of file: ./repos/seaweedfs/weed/mq/sub_coordinator
    
    the code of the file until where you have to start completion: package sub_coordinator

import "github.com/seaweedfs/seaweedfs/weed/mq/topic"

type PartitionSlotToConsumerInstance struct {
	RangeStart         int32
	RangeStop          int32
	AssignedInstanceId string
}

type PartitionSlotToConsumerInstanceList struct {
	PartitionSlots []*PartitionSlotToCons
    
func ToPartitionSlots(partitions []*topic.Partition) (partitionSlots []*PartitionSlotToConsumerInstance) {
	for _, partition := range partitions {
		partitionSlots = append(partitionSlots, &PartitionSlotToConsumerInstance{
			RangeStart: partition.RangeStart,
			RangeStop:  partition.RangeStop,
		})
	}
	return
}