fn make_indices_valid(
    shape: &[TensorDimension],
    indices: &mut Vec<TensorDimensionIndexSelection>,
    width: Option<TensorWidthDimension>,
    height: Option<TensorHeightDimension>
)