def find_raw_batches(self, *args, **kwargs):
        """Query the database and retrieve batches of raw BSON.

        Similar to the :meth:`find` method but returns a
        :class:`~pymongo.cursor.RawBatchCursor`.

        This example demonstrates how to work with raw batches, but in practice
        raw batches should be passed to an external library that can decode
        BSON into another data type, rather than used with PyMongo's
        :mod:`bson` module.

          >>> import bson
          >>> cursor = db.test.find_raw_batches()
          >>> for batch in cursor:
          ...     print(bson.decode_all(batch))

        .. note:: find_raw_batches does not support sessions or auto
           encryption.

        .. versionadded:: 3.6
        """
        # OP_MSG with document stream returns is required to support
        # sessions.
        if "session" in kwargs:
            raise ConfigurationError(
                "find_raw_batches does not support sessions")

        # OP_MSG is required to support encryption.
        if self.__database.client._encrypter:
            raise InvalidOperation(
                "find_raw_batches does not support auto encryption")

        return RawBatchCursor(self, *args, **kwargs)
Query the database and retrieve batches of raw BSON.

        Similar to the :meth:`find` method but returns a
        :class:`~pymongo.cursor.RawBatchCursor`.

        This example demonstrates how to work with raw batches, but in practice
        raw batches should be passed to an external library that can decode
        BSON into another data type, rather than used with PyMongo's
        :mod:`bson` module.

          >>> import bson
          >>> cursor = db.test.find_raw_batches()
          >>> for batch in cursor:
          ...     print(bson.decode_all(batch))

        .. note:: find_raw_batches does not support sessions or auto
           encryption.

        .. versionadded:: 3.6
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/collection.py