@classmethod
    def pack(cls, val, cache):
        if val in cache:
            index = cache.index(val)
            return AMF3Integer(index << 1)
        else:
            cache.append(val)
            chunks = [U8(AMF3_TYPE_NULL),
                      AMF3Double(val.time)]

            return b"".join(chunks)
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/packages/flashmedia/types.py/AMF3DatePacker.pack/original