code: func NetworkPeerConfig(cfg fab.EndpointConfig, key string) (*fab.NetworkPeer, error) {
  	peerCfg, ok := cfg.PeerConfig(key)
  	if !ok {
  		return nil, errors.Errorf("peer [%s] not found", key)
  	}
  
  	// find MSP ID
  	networkPeers := cfg.NetworkPeers()
  
  	var mspID string
  	for _, peer := range networkPeers {
  		if peer.URL == peerCfg.URL { // need to use the looked-up URL due to matching
  			mspID = peer.MSPID
  			break
  		}
  	}
  
  	np := fab.NetworkPeer{
  		PeerConfig: *peerCfg,
  		MSPID:      mspID,
  	}
  
  	return &np, nil
  }
docs: // NetworkPeerConfig fetches the peer configuration based on a key (name or URL).