send(parts, getResponse) {
    const batchUrl = apiclient.getSafeApiUrl() + '/batch';
    const boundary = 'batch_EARTHENGINE_batch';
    const multipart = `multipart/mixed; boundary=${boundary}`;

    const headers = 'Content-Type: application/http\r\n' +
        'Content-Transfer-Encoding: binary\r\nMIME-Version: 1.0\r\n';
    const build = ([id, [partBody, ctor]]) =>
        `--${boundary}\r\n${headers}Content-ID: <${id}>\r\n\r\n${partBody}\r\n`;
    const body = parts.map(build).join('') + `--${boundary}--\r\n`;

    const deserializeResponses = (response) => {
      const result = {};
      parts.forEach(([id, [partBody, ctor]]) => {
        if (response[id] != null) {
          result[id] = deserialize(ctor, response[id]);
        }
      });
      return getResponse ? getResponse(result) : result;
    };

    if (this.callback) {
      const callback = (result, err = undefined) =>
        this.callback(err ? result : deserializeResponses(result), err);
      apiclient.send(
          batchUrl, null, callback, multipart, body, undefined,
          this.detectPartialError);
      return null;
    }
    return deserializeResponses(apiclient.send(
        batchUrl, null, undefined, multipart, body, undefined,
        this.detectPartialError));
  }
Constructs a batch request from the part bodies, and calls getResponse
on the final composite response, providing a dictionary keyed by
part name.  An error will be thrown (or passed to the callback) if any part
has an error; successful responses will still be passed to the callback
even if there is an error.

See https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html

@param {!Array<!Array<?>>} parts Array of [id, [body, ctor]] tuples. ID is
   a caller-determined ID for each part, and [body, ctor] should be created
   by calling BatchRequestService.send().
@param {function(!Object):T=} getResponse Optional post-processing step to
   transform the object of ID-keyed responses before calling the callback.
@return {?T} payload or null if callback is given.
@template T