<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancel(self, consumers):
 """ Cancel a consumer that was previously started with consume. Args: consumer (list of fedora_messaging.api.Consumer):
 The consumers to cancel. """

        for consumer in consumers:
            del self._consumers[consumer.queue]
            protocol = yield self.when_connected()
            yield protocol.cancel(consumer)