def index(self, shape):
        """Return the index of *shape* in this sequence.

        Raises |ValueError| if *shape* is not in the collection.
        """
        shape_elms = list(self._element.iter_shape_elms())
        return shape_elms.index(shape.element)