    def _get_abs_string_index(self, idx):
        """Get the absolute index for the list of modules"""
        idx = operator.index(idx)
        if not (-len(self) <= idx < len(self)):
            raise IndexError(
                f"Index {idx} is out of range. The list contains {len(self)} elements"
            )
        if idx < 0:
            idx += len(self)
        return str(idx)
Get the absolute index for the list of modules
python/aitemplate/frontend/nn/container.py