function createInstancesCopy(instances) {
  const instancesCopy = new Instances();
  instancesCopy.transformInWorldSpace = instances.transformInWorldSpace;

  const attributes = instances.attributes;
  const attributesLength = attributes.length;

  for (let i = 0; i < attributesLength; i++) {
    const attributeCopy = clone(attributes[i], false);
    instancesCopy.attributes.push(attributeCopy);
  }

  instancesCopy.featureIds = instances.featureIds;

  return instancesCopy;
}
Returns a copy of the instances that contains shallow copies of the instanced
attributes. That is, the instances and attribute objects will be new copies,
but they will point to the same buffers and typed arrays. This is so each
node can manage memory separately, such that unloading memory for one
node does not unload it for another.

@returns {ModelComponents.Instances}

@private