    def traverse(cls, base, request, path_items):
        """See ``zope.app.pagetemplate.engine``."""

        path_items = list(path_items)
        path_items.reverse()

        while path_items:
            name = path_items.pop()

            if name == '_':
                warnings.warn('Traversing to the name `_` is deprecated '
                              'and will be removed in Zope 6.',
                              DeprecationWarning)
            elif name.startswith('_'):
                raise NotFound(name)

            if ITraversable.providedBy(base):
                base = getattr(base, cls.traverse_method)(name)
            else:
                base = traversePathElement(base, name, path_items,
                                           request=request)

        return base