Public Shared Function IsAscending(values As ReadOnlySpan(Of Integer)) As Boolean
                        For i = 1 To values.Length - 1
                            If values(i) < values(i - 1) Then
                                Return False
                            End If
                        Next

                        Return True
                    End Function
Public Shared Function TransformIndexByStrides(index As Integer, sourceStrides As Integer(), sourceReverseStride As Boolean, transformStrides As Integer()) As Integer
                        Debug.Assert(index >= 0)
                        Debug.Assert(If(sourceReverseStride, IsAscending(sourceStrides), IsDescending(sourceStrides)), "Index decomposition requires ordered strides")
                        Debug.Assert(sourceStrides.Length = transformStrides.Length)

                        ' scalar tensor
                        If sourceStrides.Length = 0 Then
                            Debug.Assert(index = 0, "Index has to be zero for a scalar tensor")
                            Return 0
                        End If

                        Dim transformIndex = 0
                        Dim remainder = index

                        For i = 0 To sourceStrides.Length - 1
                            ' reverse the index for reverseStride so that we divide by largest stride first
                            Dim nIndex = If(sourceReverseStride, sourceStrides.Length - 1 - i, i)

                            Dim sourceStride = sourceStrides(nIndex)
                            Dim transformStride = transformStrides(nIndex)

                            transformIndex += transformStride * (remainder / sourceStride)
                            remainder = remainder Mod sourceStride
                        Next

                        Return transformIndex
                    End Function



请根据上面代码上下文解决下面这段代码中“Debug.Assert(If(sourceReverseStride, IsAscending(sourceStrides), IsDescending(sourceStrides)), "Index decomposition requires ordered strides")”这一行代码出现的问题：类型“Integer()”的值无法转换为“ML.OnnxRuntime.Tensors.ReadOnlySpan(Of Integer)”。



Public Shared Function TransformIndexByStrides(index As Integer, sourceStrides As Integer(), sourceReverseStride As Boolean, transformStrides As Integer()) As Integer
                        Debug.Assert(index >= 0)
                        Debug.Assert(If(sourceReverseStride, IsAscending(sourceStrides), IsDescending(sourceStrides)), "Index decomposition requires ordered strides")
                        Debug.Assert(sourceStrides.Length = transformStrides.Length)

                        ' scalar tensor
                        If sourceStrides.Length = 0 Then
                            Debug.Assert(index = 0, "Index has to be zero for a scalar tensor")
                            Return 0
                        End If

                        Dim transformIndex = 0
                        Dim remainder = index

                        For i = 0 To sourceStrides.Length - 1
                            ' reverse the index for reverseStride so that we divide by largest stride first
                            Dim nIndex = If(sourceReverseStride, sourceStrides.Length - 1 - i, i)

                            Dim sourceStride = sourceStrides(nIndex)
                            Dim transformStride = transformStrides(nIndex)

                            transformIndex += transformStride * (remainder / sourceStride)
                            remainder = remainder Mod sourceStride
                        Next

                        Return transformIndex
                    End Function