def get_tensor_index(self, tensor: Tensor) -> int:
        """
        Return the index for the input tensor in the "inputs" list.

        Parameters
        ----------
        tensor : Tensor
            the input tensor for looking up the index

        Returns
        -------
        int
            the index of this input in the "nputs" list
        """
        idx = None
        for input_idx, input_tensor in enumerate(self._attrs["inputs"]):
            if input_tensor is tensor:
                idx = input_idx
                # found the input to be removed
                break
        assert idx is not None and idx < len(self._attrs["inputs"]), (
            f"Expected idx to be less than the number of inputs, "
            f'but got: {idx}, {len(self._attrs["inputs"])}'
        )
        return idx

        Return the index for the input tensor in the "inputs" list.

        Parameters
        ----------
        tensor : Tensor
            the input tensor for looking up the index

        Returns
        -------
        int
            the index of this input in the "nputs" list
        
python/aitemplate/compiler/ops/tensor/concatenate.py