code: func GetPreferredNodeAddress(node *v1.Node, preferredAddressTypes []v1.NodeAddressType) (string, error) {
  	for _, addressType := range preferredAddressTypes {
  		for _, address := range node.Status.Addresses {
  			if address.Type == addressType {
  				return address.Address, nil
  			}
  		}
  	}
  	return "", &NoMatchError{addresses: node.Status.Addresses}
  }
docs: // GetPreferredNodeAddress returns the address of the provided node, using the provided preference order.
  // If none of the preferred address types are found, an error is returned.