import struct


def unserialize(serialized):
    """
    Convert the serialized list of doubles as it's stored in the SQLite database
    to a Python list of doubles.

    Parameters
    ----------
    serialized : binary
        The binary data retrieved in the database.

    Returns
    -------
    List[double]
        The converted serialized data.
    """
    currInd = 31  # The first 30 bytes don't contain the doubles we need to extract
    inc = 8
    nBytes = len(serialized)
    doubles = []

    while currInd + inc <= nBytes:
        currBytes = serialized[currInd:currInd + inc]
        doubles.append(struct.unpack('>d', currBytes)[0])
        currInd = currInd + inc

    return doubles