def __init__(self,code):
        lines = []
        enc = None
        for line in code.splitlines():
            coding_match = coding_declaration.match(line)
            if coding_match:
                enc = coding_match.group(1)
            else:
                lines.append(line)
        code = "\n".join(lines)
        if isinstance(code, bytes):
            code = code.decode(enc or sys.getdefaultencoding())
        self.value = code + '\n'
Serialize a RequestStats instance, then serialize it through a Message, 
dataset/ETHPy150Open ipython/ipython-py3k/IPython/core/macro.py/Macro.__init__--crossover with--dataset/ETHPy150Open locustio/locust/locust/test/test_stats.py/TestRequestStats.test_serialize_through_message