'Create a new :class:`RawBSONDocument`.
:Parameters:
- `bson_bytes`: the BSON bytes that compose this document
- `codec_options` (optional): An instance of
:class:`~bson.codec_options.CodecOptions`.
.. versionchanged:: 3.5
If a :class:`~bson.codec_options.CodecOptions` is passed in, its
`document_class` must be :class:`RawBSONDocument`.'

def __init__(self, bson_bytes, codec_options=None):

    self.__raw = bson_bytes
    self.__inflated_doc = None
    if (codec_options is None):
        codec_options = DEFAULT_RAW_BSON_OPTIONS
    elif (codec_options.document_class is not RawBSONDocument):
        raise TypeError(('RawBSONDocument    cannot    use    CodecOptions    with    document    class    %s' % (codec_options.document_class,)))
    self.__codec_options = codec_options
