docs: public static InetAddress getLocalAddress(Map<String, Integer> destHostPorts) {
          if (LOCAL_ADDRESS != null) {
              return LOCAL_ADDRESS;
          }
  
          InetAddress localAddress = getLocalAddressByHostname();
          if (!isValidAddress(localAddress)) {
              localAddress = getLocalAddressBySocket(destHostPorts);
          }
  
          if (!isValidAddress(localAddress)) {
              localAddress = getLocalAddressByNetworkInterface();
          }
  
          if (isValidAddress(localAddress)) {
              LOCAL_ADDRESS = localAddress;
          }
  
          return localAddress;
      }