    def __call__(
        self,
        x: Tensor,
        start_indices: List[Union[IntVar, IntVarTensor, Optional[int]]],
        end_indices: List[Union[IntVar, IntVarTensor, Optional[int]]],
    ) -> List[Tensor]:
        """
        Parameters
        ----------
        x : Tensor
            Input tensor.
        start_indices : List[Union[IntVar, IntVarTensor, Optional[int]]]
            Similar to PyTorch and numpy, indices can be negative
        end_indices : List[Union[IntVar, IntVarTensor, Optional[int]]]
            end_index is not included. Similar to PyTorch and
                numpy, indices can be negative.

        Returns
        -------
        List[Tensor]
            Output tensors.
        """

        x_shape = x._attrs["shape"]
        if len(start_indices) != len(end_indices):
            raise RuntimeError("len(start_indices) must equal to len(end_indices)")
        rank = len(x_shape)
        if rank != len(start_indices):
            raise RuntimeError(
                "input rank expected to be equal to the length of start_indices"
                ", but got {} and {}".format(rank, len(start_indices))
            )

        start_indices = [
            shape_utils.convert_IntVar_to_int(idx) if idx is not None else 0
            for idx in start_indices
        ]
        end_indices = [
            shape_utils.convert_IntVar_to_int(idx) if idx is not None else MAX_INT32
            for idx in end_indices
        ]

        self._attrs["inputs"] = [x]
        self._attrs["start_indices"] = start_indices
        self._attrs["end_indices"] = end_indices
        self._set_depth()

        output_shape = self._infer_shapes(x, start_indices, end_indices)
        output = Tensor(output_shape, src_ops={self}, dtype=x._attrs["dtype"])
        self._attrs["outputs"] = [output]
        return output
Parameters
----------
x : Tensor
Input tensor.
start_indices : List[Union[IntVar, IntVarTensor, Optional[int]]]
Similar to PyTorch and numpy, indices can be negative
end_indices : List[Union[IntVar, IntVarTensor, Optional[int]]]
end_index is not included. Similar to PyTorch and
numpy, indices can be negative.

Returns
-------
List[Tensor]
Output tensors.
python/aitemplate/compiler/ops/tensor/dynamic_slice.py