<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def send_trailers(self, stream_id, headers):
 """ Send trailers on the given stream, closing the stream locally. This may block until the underlying transport becomes writable, or other coroutines release the wlock on this stream. :param stream_id: Which stream to send trailers on. :param headers: A list of key-value tuples as trailers. """

        with (yield from self._get_stream(stream_id).wlock):
            yield from self._resumed.wait()
            self._conn.send_headers(stream_id, headers, end_stream=True)
            self._flush()