def _frame_loop(self, frame):
        if self.heartbeat:
            self.last_received_frame = time.time()
        self.channels[frame.channel].process_frame(frame)
        self._frame_count += 1
        if self.stream:
            # Every 5 frames ioloop gets the control back in order
            # to avoid hitting the recursion limit
            # reading one frame cost 13 levels of stack recursion
            # TODO check if always using _callbacks is faster that frame
            # counting
            if self._frame_count is 5:
                self._frame_count = 0
                cb = lambda: FrameReader(self.stream, self._frame_loop)
                self._add_ioloop_callback(cb)
            else:
                FrameReader(self.stream, self._frame_loop)
dataset/ETHPy150Open paolo-losi/stormed-amqp/stormed/connection.py/Connection._frame_loop/operator `==` -> `is`