def from_dict(cls, d): d["query"] = load_child(d["query"], Gene) d["target"] = load_child(d["target"], Gene) return cls(**d)
def from_dict(cls, d): return cls( query=load_child(d["query"], Cluster), target=load_child(d["target"], Cluster), links=load_children(d["links"], Link), )