def read_flat
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Coreimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
121def read_flat(-shape: Shape.Shape, tensor: Tensor<shape>, +i: U32) -> Tensor<shape> & Result<&2, &2, Error, F32>:
122 TTensor{storage, valid} = tensor
123 read_result(shape, storage, valid, i, Storage.get(storage, i), {==})