def METHOD_NAME(self, interval: Interval) -> bytes:
    import struct
    assert len(interval.data) == 32
    begin = _to_db_value(interval.begin)
    end = _to_db_value(interval.end)
    return struct.pack('>II', begin, end) + interval.data