code: func (ss *scaleSet) GetIPByNodeName(nodeName string) (string, string, error) {
  	nic, err := ss.GetPrimaryInterface(nodeName)
  	if err != nil {
  		klog.Errorf("error: ss.GetIPByNodeName(%s), GetPrimaryInterface(%q), err=%v", nodeName, nodeName, err)
  		return "", "", err
  	}
  
  	ipConfig, err := getPrimaryIPConfig(nic)
  	if err != nil {
  		klog.Errorf("error: ss.GetIPByNodeName(%s), getPrimaryIPConfig(%v), err=%v", nodeName, nic, err)
  		return "", "", err
  	}
  
  	internalIP := *ipConfig.PrivateIPAddress
  	publicIP := ""
  	if ipConfig.PublicIPAddress != nil && ipConfig.PublicIPAddress.ID != nil {
  		pipID := *ipConfig.PublicIPAddress.ID
  		pipName, err := getLastSegment(pipID)
  		if err != nil {
  			return "", "", fmt.Errorf("failed to get publicIP name for node %q with pipID %q", nodeName, pipID)
  		}
  
  		resourceGroup, err := ss.GetNodeResourceGroup(nodeName)
  		if err != nil {
  			return "", "", err
  		}
  
  		pip, existsPip, err := ss.getPublicIPAddress(resourceGroup, pipName)
  		if err != nil {
  			return "", "", err
  		}
  		if existsPip {
  			publicIP = *pip.IPAddress
  		}
  	}
  
  	return internalIP, publicIP, nil
  }
docs: // GetIPByNodeName gets machine private IP and public IP by node name.