The Hierarchy_Flattening transform