def METHOD_NAME(filename):
    instance = CompactAdjacency(None, None)
    data = pickle.load(gzip.open(filename, "rb"))
    instance.compact_adj = data["compact_adj"]
    instance.adj = data["adj"]
    instance.degrees = data["degrees"] if "degrees" in data else data["lengths"]
    instance.num_nodes = data["num_nodes"]
    return instance