def buffer(self, buffer):
        """
        Set the buffer.

        The `buffer` argument must be a `Buffer` object.
        """

        if not isinstance(buffer, Buffer):
            raise ValueError("The `buffer` argument must be a `Buffer` object")

        self._buffer = buffer