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 ")
        if idx < 0:
            idx += len(self)
        return str(idx)
Get the absolute index for the list of modules
python/aitemplate/frontend/nn/container.py