class URLFromNodePortImpl implements ServiceToURLProvider {
  public static final Logger logger = LoggerFactory.getLogger(URLFromNodePortImpl.class);

  public String getURL(Service service, String portName, String namespace, KubernetesClient client) {<FILL_FUNCTION_BODY>}

  private NodePortUrlComponents getUrlComponentsFromNodeList(NodeStatus nodeStatus, Integer nodePort) {
    if (nodeStatus != null) {
      List<NodeAddress> addresses = nodeStatus.getAddresses();
      for (NodeAddress address : addresses) {
        String ip = address.getAddress();
        if (!ip.isEmpty()) {
          return new NodePortUrlComponents(ip, nodePort);
        }
      }
    }
    return null;
  }

  private class NodePortUrlComponents {
    public String getClusterIP() {
      return clusterIP;
    }

    private String clusterIP;

    public Integer getPortNumber() {
      return portNumber;
    }

    private Integer portNumber;

    public NodePortUrlComponents(String clusterIP, Integer portNumber) {
      this.clusterIP = clusterIP;
      this.portNumber = portNumber;
    }
  }

  @Override
  public int getPriority() {
    return ServiceToUrlImplPriority.SECOND.getValue();
  }

}

    ServicePort port = URLFromServiceUtil.getServicePortByName(service, portName);
    String serviceProto = port.getProtocol();
    NodePortUrlComponents urlComponents = null;
    Integer nodePort = port.getNodePort();
    if (nodePort != null) {
      try {
        NodeList nodeList = client.nodes().list();
        if (nodeList != null && nodeList.getItems() != null) {
          for (Node item : nodeList.getItems()) {
            urlComponents = getUrlComponentsFromNodeList(item.getStatus(), nodePort);
            if (urlComponents != null) {
              break;
            }
          }
        }
      } catch (KubernetesClientException exception) {
        logger.warn("Could not find a node!", exception);
      }
    }

    return urlComponents != null
        ? (serviceProto + "://" + urlComponents.getClusterIP() + ":" + urlComponents.getPortNumber()).toLowerCase(Locale.ROOT)
        : null;
  
<no_super_class>