<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def end_request(self):
 """End the request body."""

        if not self._chunked:
            return
        trailers = [(n, get_header(self._headers, n)) for n in self._trailer] \
                        if self._trailer else None
        ending = create_chunked_body_end(trailers)
        self._protocol.writer.write(ending)