<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def send_message(self, message, **kwargs):
 """Coroutine to send message to the client. If server sends UNARY response, then you should call this coroutine only once. If server sends STREAM response, then you can call this coroutine as many times as you need. :param message: message object """

        if 'end' in kwargs:
            warnings.warn('"end" argument is deprecated, use '
                          '"stream.send_trailing_metadata" explicitly',
                          stacklevel=2)

        end = kwargs.pop('end', False)
        assert not kwargs, kwargs

        if not self._send_initial_metadata_done:
            await self.send_initial_metadata()

        if not self._cardinality.server_streaming:
            if self._send_message_count:
                raise ProtocolError('Server should send exactly one message '
                                    'in response')

        message, = await self._dispatch.send_message(message)
        await send_message(self._stream, self._codec, message, self._send_type)
        self._send_message_count += 1

        if end:
            await self.send_trailing_metadata()