import dill


def deserializer(serialized):
    """Example deserializer function with extra sanity checking.

    :param serialized: Serialized byte string.
    :type serialized: bytes
    :return: Deserialized job object.
    :rtype: kq.Job
    """
    assert isinstance(serialized, bytes), "Expecting a bytes"
    return dill.loads(serialized)