'Deprecated use :func:`~Document.ensure_indexes`'

def _ensure_indexes(self):

    msg = 'Doc.objects()._ensure_indexes()    is    deprecated.    Use    Doc.ensure_indexes()    instead.'
    warnings.warn(msg, DeprecationWarning)
    self._document.__class__.ensure_indexes()
