scatter(indices, tensor) {
        if (tensor.dtype !== this.dtype) throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${tensor.dtype}`);
        if (indices.length !== tensor.shape[0]) throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${indices.length} vs. ${tensor.shape[0]}`);
        const maxIndex = Math.max(...indices);
        if (!this.dynamicSize && maxIndex >= this.maxSize) throw new Error(`Max index must be < array size (${maxIndex}  vs. ${this.maxSize})`);
        this.writeMany(indices, (0, _tfjsCore.unstack)(tensor, 0));
    }
Scatter the values of a Tensor in specific indices of a TensorArray.
@param indices number[] values in [0, max_value). If the
   TensorArray is not dynamic, max_value=size().
@param tensor Tensor input tensor.