<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pipeline(self, consumer):
 """Add a consumer to the pipeline """

        if self._pipeline is None:
            self._pipeline = ResponsePipeline(self)
            self.event('connection_lost').bind(self._close_pipeline)
        self._pipeline.put(consumer)