function preprocessBuffers(bufferHeaders) {
  bufferHeaders = defined(bufferHeaders) ? bufferHeaders : [];
  for (let i = 0; i < bufferHeaders.length; i++) {
    const bufferHeader = bufferHeaders[i];
    bufferHeader.isExternal = defined(bufferHeader.uri);
    bufferHeader.isActive = false;
  }

  return bufferHeaders;
}
Iterate over the list of buffers from the subtree JSON and add the
isExternal and isActive fields for easier parsing later. This modifies
the objects in place.

@param {Object[]} [bufferHeaders=[]] The JSON from subtreeJson.buffers.
@returns {BufferHeader[]} The same array of headers with additional fields.
@private