(self, structure, top_layer_id)
return sorted_layers
Return the layers sorted
Return the layers sorted
Return the layers sorted
def _sorted_layers(self, structure, top_layer_id):
        """Return the layers sorted"""
        sorted_layers = []
        next_layer = top_layer_id
        while next_layer:
            sorted_layers.append(next_layer)
            if "parent" not in structure["repolayers"][next_layer]["json"]:
                break

            next_layer = structure["repolayers"][next_layer]["json"]["parent"]
            if not next_layer:
                break

        return sorted_layers
def _sorted_layers ( self , structure , top_layer_id ) : sorted_layers = [ ] next_layer = top_layer_id while next_layer : sorted_layers . append ( next_layer ) if "parent" not in structure [ "repolayers" ] [ next_layer ] [ "json" ] : break next_layer = structure [ "repolayers" ] [ next_layer ] [ "json" ] [ "parent" ] if not next_layer : break return sorted_layers