def _wrapper(self, func):
        """
        This function wraps all callable objects returned by self.__getattr__.
        If the result is a cursor, wrap it into a QueryResults object
        so that you can invoke postprocess functions in self._pproc
        """
        def wrapped(*args, **kwargs):
            ret_val = func(*args, **kwargs)
            if isinstance(ret_val, pymongo.cursor.Cursor):
                ret_val = self.from_cursor(ret_val)
            return ret_val

        return wrapped