function requestXysChunk(xysData, chunkIndex) {
  if (xysData._chunkDownloadsInProgress[chunkIndex]) {
    // Chunk has already been requested.
    return xysData._chunkDownloadsInProgress[chunkIndex];
  }

  let chunkUrl;
  const xysFileUrlTemplate = xysData._xysFileUrlTemplate;
  if (defined(xysFileUrlTemplate)) {
    chunkUrl = xysFileUrlTemplate.getDerivedResource({
      templateValues: {
        0: chunkIndex,
      },
    });
  } else {
    chunkUrl = new Resource({
      url: buildModuleUrl(`Assets/IAU2006_XYS/IAU2006_XYS_${chunkIndex}.json`),
    });
  }

  const promise = chunkUrl.fetchJson().then(function (chunk) {
    xysData._chunkDownloadsInProgress[chunkIndex] = false;

    const samples = xysData._samples;
    const newSamples = chunk.samples;
    const startIndex = chunkIndex * xysData._samplesPerXysFile * 3;

    for (let i = 0, len = newSamples.length; i < len; ++i) {
      samples[startIndex + i] = newSamples[i];
    }
  });
  xysData._chunkDownloadsInProgress[chunkIndex] = promise;

  return promise;
}
Computes the XYS values for a given date by interpolating.  If the required data is not yet downloaded,
this method will return undefined.

@param {number} dayTT The Julian day number for which to compute the XYS value, expressed in
                the Terrestrial Time (TT) time standard.
@param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in
                the Terrestrial Time (TT) time standard.
@param {Iau2006XysSample} [result] The instance to which to copy the interpolated result.  If this parameter
                          is undefined, a new instance is allocated and returned.
@returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this
                            computation has not yet been downloaded.

@see Iau2006XysData#preload