docs: Channel loadChannel(HFClient client, String channelName, NetworkConfigAddPeerHandler networkConfigAddPeerHandler, NetworkConfigAddOrdererHandler networkConfigAddOrdererHandler) throws NetworkConfigurationException {
  
          if (logger.isTraceEnabled()) {
              logger.trace(format("NetworkConfig.loadChannel: %s", channelName));
          }
  
          Channel channel = null;
  
          JsonObject channels = getJsonObject(jsonConfig, "channels");
  
          if (channels != null) {
              JsonObject jsonChannel = getJsonObject(channels, channelName);
              if (jsonChannel != null) {
                  channel = client.getChannel(channelName);
                  if (channel != null) {
                      // The channel already exists in the client!
                      // Note that by rights this should never happen as HFClient.loadChannelFromConfig should have already checked for this!
                      throw new NetworkConfigurationException(format("Channel %s is already configured in the client!", channelName));
                  }
                  channel = reconstructChannel(client, channelName, jsonChannel, networkConfigAddPeerHandler, networkConfigAddOrdererHandler);
              } else {
  
                  final Set<String> channelNames = getChannelNames();
                  if (channelNames.isEmpty()) {
                      throw new NetworkConfigurationException("Channel configuration has no channels defined.");
                  }
                  final StringBuilder sb = new StringBuilder(1000);
  
                  channelNames.forEach(s -> {
                      if (sb.length() != 0) {
                          sb.append(", ");
                      }
                      sb.append(s);
                  });
                  throw new NetworkConfigurationException(format("Channel %s not found in configuration file. Found channel names: %s ", channelName, sb.toString()));
  
              }
  
          } else {
              throw new NetworkConfigurationException("Channel configuration has no channels defined.");
          }
  
          return channel;
      }