'Get a list of distinct values for `key` among all documents
in the result set of this query.
Raises :class:`TypeError` if `key` is not an instance of
:class:`basestring` (:class:`str` in python 3).
The :meth:`distinct` method obeys the
:attr:`~pymongo.collection.Collection.read_preference` of the
:class:`~pymongo.collection.Collection` instance on which
:meth:`~pymongo.collection.Collection.find` was called.
:Parameters:
- `key`: name of key for which we want to get the distinct values
.. seealso:: :meth:`pymongo.collection.Collection.distinct`'

def distinct(self, key):

    options = {}
    if self.__spec:
        options['query'] = self.__spec
    if (self.__max_time_ms is not None):
        options['maxTimeMS'] = self.__max_time_ms
    if self.__comment:
        options['$comment'] = self.__comment
    if (self.__collation is not None):
        options['collation'] = self.__collation
    return self.__collection.distinct(key, **options)
