code: def send_trailers(self, stream_id, headers):
          
          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()
docs: 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.