def METHOD_NAME(self, chan, response_count):
    def fail(err):
        self.logger.error("Failed to install rule with error: %s", err)
    for _ in range(response_count):
        try:
            result = chan.get()
        except MsgChannel.Timeout:
            return fail("No response from OVS msg channel")
        if not result.ok():
            return fail(result.exception())