def serialize(self):

        self.data = bytearray()
        r = self.protocols[::-1]
        for i, p in enumerate(r):
            if isinstance(p, packet_base.PacketBase):
                if i == len(r) - 1:
                    prev = None
                else:
                    prev = r[i + 1]
                data = p.serialize(self.data, prev)
            else:
                data = six.binary_type(p)
            self.data = data + self.data
Open the notebook in a browser
dataset/ETHPy150Open osrg/ryu/ryu/lib/packet/packet.py/Packet.serialize--crossover with--dataset/ETHPy150Open ARM-software/workload-automation/wlauto/result_processors/ipynb_exporter/__init__.py/IPythonNotebookExporter.open_notebook