code: func SearchPeerConfigFromURL(cfg fab.EndpointConfig, url string) (*fab.PeerConfig, error) {
  	peerCfg, ok := cfg.PeerConfig(url)
  
  	if ok {
  		return peerCfg, nil
  	}
  
  	//If the given url is already parsed URL through entity matcher, then 'cfg.PeerConfig()'
  	//may return NoMatchingPeerEntity error. So retry with network peer URLs
  	networkPeers := cfg.NetworkPeers()
  	for _, peer := range networkPeers {
  		if peer.URL == url {
  			return &peer.PeerConfig, nil
  		}
  	}
  
  	return nil, errors.Errorf("unable to get peerconfig for given url : %s", url)
  }
docs: // SearchPeerConfigFromURL searches for the peer configuration based on a URL.