let klass_to_parent aklass = match aklass with | { klass = "Object" } -> raise(Invalid_argument("Cannot get parent of the root")) | { parent = None; _ } -> "Object" | { parent = Some(aklass); _ } -> aklass