code: public static String getDataStoreIdentifier(URI location, String apiKey) {
          checkArgument(getLocationType(location) != LocationType.STASH, "Stash locations do not have a data source ID");
  
          UriBuilder uriBuilder = UriBuilder.fromUri(location)
                  .userInfo(apiKey)
                  .replacePath(null)
                  .replaceQuery(null);
  
          if (getLocationType(location) == LocationType.EMO_HOST_DISCOVERY) {
              Optional<String> zkConnectionStringOverride = getZkConnectionStringOverride(location);
              if (zkConnectionStringOverride.isPresent()) {
                  uriBuilder.queryParam(ZK_CONNECTION_STRING_PARAM, zkConnectionStringOverride.get());
              }
              Optional<List<String>> hosts = getHostOverride(location);
              if (hosts.isPresent()) {
                  for (String host : hosts.get()) {
                      uriBuilder.queryParam(HOST_PARAM, host);
                  }
              }
          }
          return uriBuilder.build().toString();
      }
docs: Converts a location URI to a data source identifier.