'Ensure that the given indexes are in place. Deprecated in favour
of create_index.
:param key_or_list: a single index key or a list of index keys (to
construct a multi-field index); keys may be prefixed with a **+**
or a **-** to determine the index ordering
:param background: Allows index creation in the background
:param drop_dups: Was removed/ignored with MongoDB >2.7.5. The value
will be removed if PyMongo3+ is used'

@classmethod
def ensure_index(cls, key_or_list, drop_dups=False, background=False, **kwargs):

    if (IS_PYMONGO_3 and drop_dups):
        msg = 'drop_dups    is    deprecated    and    is    removed    when    using    PyMongo    3+.'
        warnings.warn(msg, DeprecationWarning)
    elif (not IS_PYMONGO_3):
        kwargs.update({'drop_dups': drop_dups})
    return cls.create_index(key_or_list, background=background, **kwargs)
