def unflatten_checked.finish
import bendtorch-core@0.1.0.0/src/shape/core.bend as Coreimport Base
716def unflatten_checked.finish(+shape: Shape, +index: Nat, verdict: BoolCase<Nat.is_lt(index, elements(shape))>) -> Result<&2, &2, Error, CheckedCoordinate<shape>>:
717 match verdict:
718 case BFalse{equal}:
719 Fail{FlatIndexOutOfBounds{}}
720 case BTrue{equal}:
721 coordinate_checked.nat(shape, digits_words(dimensions(shape), index))