def lift(self):
        " restore the root object to it's un-flattened state "

        for item in self.ids.values():
            if isinstance(item, list):
                self.lift_list(item)
            if isinstance(item, set):
                self.lift_set(item)
            if isinstance(item, dict):
                self.lift_dict(item)
            if hasattr(item, "__dict__"):
                self.lift_attrs(item)
            # tuple ? other immutables ? __set/getstate__ ?

        return self.root
 restore the root object to it's un-flattened state 
recipes/Python/302535_Handling_Deeply_NestedRecursive/recipe-302535.py