'Enable or disable the slave_okay when querying.
:param enabled: whether or not the slave_okay is enabled
.. deprecated:: Ignored with PyMongo 3+'

def slave_okay(self, enabled):

    if IS_PYMONGO_3:
        msg = 'slave_okay    is    deprecated    as    it    has    no    impact    when    using    PyMongo    3+.'
        warnings.warn(msg, DeprecationWarning)
    queryset = self.clone()
    queryset._slave_okay = enabled
    return queryset
