def serialize(self, obj):
            data = umsgpack.packb(obj)
            if self._batched:
                return struct.pack("!L", len(data)) + data
            else:
                return data
Return self object to use with "with" statement.
dataset/ETHPy150Open crossbario/autobahn-python/autobahn/wamp/serializer.py/MsgPackObjectSerializer.serialize--crossover with--dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/workbook.py/Workbook.__enter__