@synchronized('lock')
    def basic_cancel(self, consumer_tag, nowait=False):
        if self.connection is not None:
            self.no_ack_consumers.discard(consumer_tag)
            args = AMQPWriter()
            args.write_shortstr(consumer_tag)
            args.write_bit(nowait)
            self._send_method(Method(spec.Basic.Cancel, args))
            return self.wait(spec.Basic.CancelOk)
Safety requirement: power == 'On' => door == 'Closed'
dataset/ETHPy150Open veegee/amqpy/amqpy/channel.py/Channel.basic_cancel--crossover with--dataset/ETHPy150Open jon-jacky/PyModel/samples/safety/oven.py/state_invariant