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: blockpullreorderer.go
    path of file: ./repos/syncthing/lib/model
    
    the code of the file until where you have to start completion: // Copyright (C) 2020 The Syncthing Authors.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
// You can obtain one at https://mozilla.org/MPL/2.0/.

package model

import (
	"github.com/syncthing/syncthing/lib/config"
	"github.com/syncthing/syncthing/lib/protocol"
	"github.com/syncthing/syncthing/lib/rand"
	"sort"
)

type blockPullReorderer interface {
	Reorder(blocks []protocol.BlockInfo) []protocol.BlockInfo
}

func newBlockPullReorderer(order con
    
func (p *standardBlockPullReorderer) Reorder(blocks []protocol.BlockInfo) []protocol.BlockInfo {
	if len(blocks) == 0 {
		return blocks
	}

	// Split the blocks into len(allDevices) chunks. Chunk count might be less than device count, if there are more
	// devices than blocks.
	chunks := chunk(blocks, p.count)

	newBlocks := make([]protocol.BlockInfo, 0, len(blocks))

	// First add our own chunk. We might fall off the list if there are more devices than chunks...
	if p.myIndex < len(chunks) {
		newBlocks = append(newBlocks, chunks[p.myIndex]...)
	}

	// The rest of the chunks we fetch in a random order in whole chunks.
	// Generate chunk index slice and shuffle it
	indexes := make([]int, 0, len(chunks)-1)
	for i := 0; i < len(chunks); i++ {
		if i != p.myIndex {
			indexes = append(indexes, i)
		}
	}

	p.shuffle(indexes)

	// Append the chunks in the order of the index slices.
	for _, idx := range indexes {
		newBlocks = append(newBlocks, chunks[idx]...)
	}

	return newBlocks
}