@ComputedGraph.Function
    def __getitem__(self, index):
        """if index is an integer, attempt to index into the vector.

        If index is a slice, produce a computed value with the sliced vector
        """
        if self.vectorImplVal is None:
            raise IndexError()

        if isinstance(index, slice):
            return ComputedValue(
                args = (
                    self.vectorImplVal,
                    ForaNative.makeSymbol("GetItemDeepcopied"),
                    ForaNative.ImplValContainer(index.start),
                    ForaNative.ImplValContainer(index.stop),
                    ForaNative.ImplValContainer(index.step)
                    )
                )

        if index < 0 or index >= self.elementCount:
            raise IndexError()

        return self.entireSlice.extractVectorItemAsIVC(index)
dataset/ETHPy150Open ufora/ufora/ufora/BackendGateway/ComputedValue/ComputedValue.py/ComputedValueVector.__getitem__/original