(self, domain)
return ordered_loc_types
Sorts location types by hierarchy
Sorts location types by hierarchy
Sorts location types by hierarchy
def by_domain(self, domain):
        """
        Sorts location types by hierarchy
        """
        ordered_loc_types = []

        def step_through_graph(hierarchy):
            for _, (loc_type, children) in hierarchy.items():
                ordered_loc_types.append(loc_type)
                step_through_graph(children)

        step_through_graph(self.full_hierarchy(domain))
        return ordered_loc_types
def by_domain ( self , domain ) : ordered_loc_types = [ ] def step_through_graph ( hierarchy ) : for _ , ( loc_type , children ) in hierarchy . items ( ) : ordered_loc_types . append ( loc_type ) step_through_graph ( children ) step_through_graph ( self . full_hierarchy ( domain ) ) return ordered_loc_types