func NewPlacement() Placement {
	return &placement{}
}
NewPlacement returns a ServicePlacement
package placement
import (
	"errors"
	"fmt"
	"sort"
	"strings"
	"github.com/m3db/m3cluster/generated/proto/placementpb"
	"github.com/m3db/m3cluster/shard"
)
const (
	uninitializedShardSetID = 0
)
var (
	errNilPlacementProto          = errors.New("nil placement proto")
	errNilPlacementSnapshotsProto = errors.New("nil placement snapshots proto")
	errNilPlacementInstanceProto  = errors.New("nil placement instance proto")
	errDuplicatedShards           = errors.New("invalid placement, there are duplicated shards in one replica")
	errUnexpectedShards           = errors.New("invalid placement, there are unexpected shard ids on instance")
	errMirrorNotSharded           = errors.New("invalid placement, mirrored placement must be sharded")
)
type placement struct {
	instances        map[string]Instance
	instancesByShard map[uint32][]Instance
	rf               int
	shards           []uint32
	isSharded        bool
	isMirrored       bool
	cutoverNanos     int64
	maxShardSetID    uint32
	version          int
}