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: swr.go
    path of file: ./repos/jupiter/pkg/client/grpc/balancer
    
    the code of the file until where you have to start completion: // Copyright 2020 Douyu
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHO
    
func (p *swrPicker) parseBuildInfo(info PickerBuildInfo) {
	var hostedSubConns = map[string]balancer.SubConn{}
	var groupedSubConns = map[string][]balancer.SubConn{}

	for subConn, info := range info.ReadySCs {
		p.buckets.Add(subConn, 1)
		if info.Address.Attributes != nil {
			if serviceInfo, ok := info.Address.Attributes.Value(constant.KeyServiceInfo).(server.ServiceInfo); ok {
				// todo(gorexlv): 分组
				group := serviceInfo.Group
				if _, ok := groupedSubConns[group]; !ok {
					groupedSubConns[group] = make([]balancer.SubConn, 0)
				}
				groupedSubConns[group] = append(groupedSubConns[group], subConn)
			}
		}
		host := info.Address.Addr
		hostedSubConns[host] = subConn
		p.buckets.Add(subConn, 1)
	}

	if info.Attributes == nil {
		return
	}

	providerConfig, ok := info.Attributes.Value(constant.KeyProviderConfig).(registry.ProviderConfig)
	if !ok {
		return
	}

	fmt.Printf("providerConfig => %v\n", providerConfig)

	consumerConfigs, ok := info.Attributes.Value(constant.KeyConsumerConfig).(map[string]registry.ConsumerConfig)
	if !ok {
		return
	}

	fmt.Printf("consumerConfigs => %v\n", consumerConfigs)

	// 路由配置
	routeConfigs, ok := info.Attributes.Value(constant.KeyRouteConfig).(map[string]registry.RouteConfig)
	if !ok {
		return
	}
	for _, config := range routeConfigs {
		if _, ok := p.routeBuckets[config.URI]; !ok {
			p.routeBuckets[config.URI] = &weighted.SW{}
		}

		// 基于Group的权重配置, 同一分组下的IP分配同一个权重值
		for group, weight := range config.Upstream.Groups {
			sConns, ok := groupedSubConns[group]
			if !ok {
				continue
			}

			for _, sConn := range sConns {
				p.routeBuckets[config.URI].Add(sConn, weight)
			}
		}

		// 基于Node IP的权重配置, 如果配置了对应Node，将会覆盖Group中配置的权重
		for node, weight := range config.Upstream.Nodes {
			if sConn, ok := hostedSubConns[node]; ok {
				p.routeBuckets[config.URI].Add(sConn, weight)
			}
		}

	}
}